Introduce EngineState

It is for keeping session related information and connections to
clients while restarting dispatcher.

We need more works for graceful restart. Workers should be shut down
after all pending jobs are processed.