[std] Fix position setter in BytesInput

Setting `position` wasn't resetting the bytes remaining in `totlen`, causing further reads to incorrectly throw or be truncated.