add support for http ranges

Requests containing multiple ranges are supported, but the response contains
the concatenation of all ranges instead of the correct multipart/byteranges
document.
start refactoring request/response operations
clients have no need to send partial files
refactor error sending
renaming
fix for empty error messages
typo
let the caller of send functions open files

This way the caller can correctly handle errors.
generate multipart/byteranges documents when required
ignore the content length if there is a transfer encoding applied
remove dead code