Crude DDoS protection for slow clients

Limit number of read() calls required to receive a whole request.
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().
Place the assert on main_socket before setting it

Prevents lwan_main_loop() from being called multiple times.