First draft of engine refactoring. Both the message loop (processMessage, runMessages, runEngine) and network message processing (runNEndpoint) now live inside the engine. Changes include a MessageProcessor type, a LoopStatus type, and a new Endpoint type. Endpoint notifiers have also been moved, but have yet to be dispatched.