How noise affects memory in linear recurrent networks