Send 500 error responses when things go bad.

Also determine host so we can do object moved messages properly
for HTTP/1.0 or HTTP/1.1 with missing host header.

To be fair, for HTTP/1.0 we probably need to only put the path in
to the response, but that will have to wait until we fix error
page handling to work properly rather than being some hacky
sprintfs() like 400/500 need to be.
.gitignore updates