Improved ByteRange semantics and added possibility to allocate non-zero-terminated ByteArrays (ByteArray::allocate).

Signed-off-by: Frank Mertens <frank@cyblogic.de>