Cleanup object URLs in localmsg

Fix for issue #708

- Add image cleanup function
- _sendBackScaledImage cleans up
- onerror cleans up
Nit: you could just use img.src and remove the imgUrl variable