COCAINE-102 - Thread-safe session queue.

Reasons:

 * Improve code readability a bit.
 * Less code is placed under single lock, giving other threads more chances to do some useful work. That makes engine/slave more concurrent.
 * Single responsibility principe for session queuing.
 * Fix possible UB, because `std::deque.empty()` is not guaranteed to be thread-safe and it is used without locks.