Fixed text corruption and loading crash

- Added a semaphore to MLIFont to support off-thread access of
TTF-related functionality, such as getting the width of a string when
loading the case.

- Added an AutoSemaphore object to help with that; it automatically
waits on the semaphore in its constructor and posts to the semaphore in
its destructor, ensuring that the semaphore will be waited on and posted
to regardless of anything else.

- Also added a sanity check to Image to make sure that drawing only
happens on the UI thread.  That should already be the case, but if not
it'll crash anyhow, so this will give us more sane crash information.