Refactor of RangeRequest and added tests

Range request is now created when the application starts and re-used between requests.
It has tests now!
The spec and implementations for Range requests are rather variable, so there may be some bugs.