Refactor AmqHelper to better handle message groups

The previous implementation of AmqHelper::getGroupMessage was able to
get all the group messages in their correct order but they weren't
cleared from the queue when committing. This is due to closing each
consumer used to get a certain sequence before committing.

On the other hand, not closing a consumer after consuming a message
belonging to a group means that another consumer with a selector like
"JMSXGroupId=..." can't process other messages in that group even if
the former consumer was deleted so is no longer available to consume
any more messages, even though a regular consumer can receive these
messages. This happens even if we rollback after first consuming a
group message.

Using custom message properties seems to solve these problems, which
might actually be ActiveMQ bugs.