Detect low memory and change inSample when decoding images from a URL