Changes to support the native, OS X GUI.

This commit contains changes to the generic parts of the codebase to
support the native, OS X GUI. The GUI isn't ready yet and the bulk of it
will live in a branch for now.