Only hash relevant subset of ByteBuffer

In the `ByteBuffer` implementation, only the bytes `remaining()` from the current `position()` are relevant data. The backing `array()` could well contain additional data that is not a part of the element (e.g. if the `ByteBuffer` has been sliced from a larger buffer).

Both the comparison of the existing element to the new element, and the copy of the element in to the filter operate only on the subset of the buffer between `position()` and `remaining()`; the hashing of the element should too.