Minor cleanup.
Work on issue #40. Should be mostly done, but might be some lingering issues.
Move some of the 3D editor viewport implementation from C++ over to Lua.

This works towards resolving issue #41. What's needed now is to move the actual camera movement operations over to the scripting environment so that everything is located in the one spot. Also, it'll make customizations a little easier.

This also fixes a bug where the mouse could sometimes get stuck in captured mode.