Fix a bug in converting ByteBuffers

The conversions for ByteBuffer -> byte array and seq-of ByteBuffer -> ByteBuffer incorrectly modify the buffer's position.  This fixes the issue and adds a test that would fail before the fix.