PROTON-176: Add unit tests for qpid::proton::Messenger in Perl.
PROTON-176: Fixes to qpid::proton::Messenger found by unit tests.

These fixes address issues discovered while writing the unit tests for
the Messenger class.