Added embedded auth support, PF_INET --> AF_INET, and conn. open handler

1. I'm using mongoose as an embedded webserver. This means that
users set a webserver password and username in the global settings
of my program. That means that i don't want to rely on additional
files to use the mongoose authentication functionality. This commit
allows developers to use an embedded authentication method by calling
the new mg_authorize_input function with the username, password
and domain as arguments.

2. The old and considered obsolete PF_INET socket constant has been
replaced by the AF_INET constant. The code didn't compile on
FreeBSD 10.0 with the PF_INET constant.

3. Users have the option to set a whitelist in my program. This means
that all socket connections are checked against this whitelist and
only those ip addresses that match are kept open. This commit adds
an additional open handler instead of just the close handler. When
the open handler returns a different value than 0 the connection
will be closed.