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
This adds a dependency on ctype extension (which is usually available, but nevertheless). Wouldn't is_numeric() do?