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 emssage handler is
itself added to the engine.