QPIDJMS-15: split input and output stream handling out to utility classes, enhance tests

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