PROTON-647: add method to copy an Event before use of the Collector pop() reclaims it to the pool

Applied patch from Clebert Suconic

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1617753 13f79535-47bb-0310-9956-ffa450edef68
PROTON-582: Perl Message can infer the type of the content provided.

The qpid::proton::Message->set_body() method can take either a single
argument (the body) or two arguments (the body and an explicit type).

Previous, if the second argument wasn't provided, the code assumed it
was a qpid::message::STRING type.

Now, the code will attempt to determine the type of the argument. It can
successfully infer a hash, array, int and string. It will default to a
string if it cannot otherwise determine the type.

git-svn-id: https://svn.apache.org/repos/asf/qpid/proton/trunk@1617793 13f79535-47bb-0310-9956-ffa450edef68