Added API folder and Thread/ThreadEventManager.

If this works out, hopefully this code will allow the user to run
multiple programs at the same time using the Thread class and the
ThreadEventManager.

However, we may need to write some kind of ScreenBuffer class so that
programs can be switched in and out while maintaining the state of the
screen.