Support/refactor request constructor

This came out of the request refactoring #1071
In this PR I refactored the Request constructor, mostly by extracting logic into
separate functions. I also took some initiative to move general helper functions in to the helper file.

Review please: @mikeal @FredKSchott @nylen 
this.canTunnel is never used internally. Is this meant to be a helper for consumers to read?