add support for partial file uploads

With this change you can now send only part of a file by setting from
where to start and the number of bytes to send. If the transport and the
OS support a zero-copy sent (using the sendfile API) will be used.