Fix concurrency bug in manager.

The bug was exhibited if you had a preLoop sending many requests to the
engine, but an earlier request has caused data to be received into the
engine before preLoop completes. This would block, as preLoop is waiting
for engine.Send to return, but engine is waiting for the
already-registered reply channel to be ready to receive. The solution is
to simply make preLoop run as its own goroutine. A similar change was
made to ensure engine subscriptions are handled in their own goroutine
just in case the engine shuts down during preLoop handling.