Fixes ByteBuffer support for read-only buffers:
* throws exception when a read-only buffer is used as destination
* throws exception when a read-only heap buffer is attempted to be used
as source for JNI methods
* Unsafe implementations bypass getArray to access the address field
regardless of read-only-ness
* adds tests of read-only sources of all types, including memory-mapped
buffer
* adds test of read-only destinations.

Adds forgotten range checks in JNI ByteBuffer methods.
Fixes incorrect change of ByteBuffer state in Safe HC compressor.