Work around the libev nonvirtual dtor bug.

The loop_ref destructor is not marked virtual, although it has two descendant
classes - default_loop and dynamic_loop. Avoid memory leak by using the
descendant instead of the base class for loop ownership.
Get rid of boost::unordered_map.

Coverity complains a lot about it on Boost 1.40, so drop it.
Check for session expiration early.

Check the deadline timeout before putting the session into the named queue.