Implement support for sending files via the POSIX sendfile function.

**WARNING**: Don't merge, does not handle SSL/TLS yet

I still need to add support for SSL/TLS before this is ready for master. However, I wanted to run the patch by you now. It'll probably be a couple weeks before I have time to do the SSL/TLS work, since my project doesn't require it.