Add chat message handler to engine before adding commands

Adding commands to the chat message handler requires the engine to be available, but it is not available until the chat message handler is itself added to the engine. This should probably be handled in a nice way, but as a quick fix just ordering things correctly in engine.php will do the job.