Work with MySQL Sockets

This passes anything that is not a valid port (0<int<65535) as a unix socket.
I tested this with unix sockets; this needs to be tested with a non-standard mysql port as well but I don't foresee any issues.

To use a unix socket, even one different than PHP's mysql.default_socket..
* Database Host = localhost:/path/to/socket
Actually, a unix socket is basically a file path and a network socket is an address (usually IP) combined with a port. So in fact, a socket is not a port because the address part is missing. Nevertheless, I think having $socket is fine after if you get rid of the $port variable.