JBMAR-160: fixes for JDK 8

https://issues.jboss.org/browse/JBMAR-160
The error is noticed when more than one objects are marshalled / unmarshalled...
The test of marshalling/unmarshalling only of one object passes.

If //assertTrue("No EOF", in.read() == -1); is commented out, according to the tests, all objects are unmarshalled correctly.