Respect offset and length when iterating over BytesRef in Uid. The length is starting at offset

Closes #2806
Call onMissing if doc has no value in the field.

Closes #2807