When closing config file, check for fclose() return value

Suggested on Issue #59.
Abort program if setting signal handler for SIGINT fails

Suggested on Issue #59.
Ensure MIME Type is set while building redir response
Don't use signal-unsafe longjmp in signal handler

This uses the method suggested by Leandro in
https://github.com/lpereira/lwan/issues/58 to close the main socket in
the signal handler and check for EBADF to break out of the main loop.

Fixes #58
Initialize the main_socket to -1

Also make sure we get a valid socket from the lwan_t passed into
lwan_main_loop().