add more tests for toBytesRef() from slices & fix slice.toBytes()