Issue #84, message loss on failed login.

Fix issue #84. When object is destructed during login phase, the
buffered message will be correctly sent out before connection
is terminated.
unique_mapping(): Fix crash when callback returns new array or mapping.
Source formating.