Proper gateway shutdown sequence.
Merge branch 'master' of https://github.com/cocaine/cocaine-core