Allocate our own buffer for internal framebuffer.

This is a workaround for an odd issue on X11 where the 8-bit buffer from
SDL_CreateRGBSurface is too small (not 100% sure) and resulting in
segfaults.
Fix size calculation in Clear().
Fix remaining issues with legacy framebuffer.

* Properly retain native BPP when resizing window.
* Convert the 8-bit surface before blitting.  This is slow, but the
  legacy surface is meant to be a temporary crutch on the road to fully
  utilizing native bit depth.
Automatically reassign palette on window resize.