Finished most of the backend functionality

Added in Lua backend and general scripting utilities. Backend is now
functional, and capable of reproducing the default behavior of the game
within the (none).lua script it defaults to. GUI is still completely
useless, but it will be the next target.