Make getMessages() set up collector *before* sending the request

Similar flaw was also fixed in 2c7f1efe80b988.

Also ensure that OfflineMessagesManager doesn't leak collector by using
a try/finally block.

Fixes SMACK-592