Prefs: Fix buffer overrun

Prevent intermittent crashing when prefs contains empty lines or lines with
no spaces.
Mac: Fix mouse grabbing

If mouse is grabbed on OS X, every time the mouse cursor icon changes the
cursor is recentered. Workaround similar to Windows in video_set_cursor().
SDL: Make non-Mac fullscreen cursor visible

Issue: https://github.com/cebix/macemu/issues/26

On non-Mac platforms, driver_fullscreen constructor sets up software cursor,
but switch_to_current_mode() ask for a hardware cursor, possibly due to a typo.
Neither one ends up being drawn, so the cursor goes invisible.

This change makes them agree to use a software cursor. We should eventually
move to just one place deciding which cursor to use, so they don't have to be
kept in sync.
SDL: Remove old hack, reduce flicker

The old SDL_QuitSubsystem workaround is probably obsolete, and causes
flicker on resolution changes.
SDL: Don't uselessly free the_host_buffer

It always points to a member of an SDL_Surface, which is freed by SDL.
SDL: Remove unused method and ivars

mouse_last_x, mouse_last_y and driver_window::mouse_moved() look like remnants
of X11 video, they're never really used.
SDL: Prepare to collapse fullscreen/window drivers

We want to have just one base driver that can handle both fullscreen and
windowed mode, so that we can easily switch between modes.

Create a virtual init() method to do construction, so we can move common code
from the derived classes into the base init().
SDL: Move VOSF initialization to base
SDL: Move more initialization to base

Including blitter, gray ramp, frame buffer initialization.
SDL: Move cursor initialization to base

Also decide in just one place whether to use hardware or software cursor.
SDL: Move window title setting to base
SDL: Move destruction into base
SDL: Make VOSF update functions apply to driver_base

They don't use anything special from fullscreen/windowed derived classes.
Also, get rid of unneeded friend declarations.
SDL: Move mouse movement to base
SDL: Remove useless virtual qualifiers
SDL: Move init() method into base
SDL: Completely collapse fullscreen/window drivers
SDL: Let driver_base be reused in a different video mode

Split init() into one-time initialization, and adaptation to a new video mode.
SDL: Let video driver know about cursor type change
SDL: Allow toggling fullscreen/windowed mode