Fix appearance of images in Night mode.

- Explicitly apply a white background for images, so that images with
  transparency will appear correctly (since most images were intended to
  be viewed on a white background)
- However, for math formulae, keep the background transparent, but invert
  the image using a filter! (sadly, this currently only works for KitKat+)

Bug: 68408
Bug: 68252
Change-Id: I3b3286246c84dc5b0bf87ad8d4f9016c4a37c038