added `setLength()` method

Exposes the private `onlength()` handler as public `tr.setLength(someLength)` to support custom use cases where length is not known until after a few chunks have already been pumped, or is calculated on the fly.