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
Fix variable not always being defined.
Update notes on dbhost
Fixes based on suggestions

I use the term socket for any extension, either unix socket, or internet socket (port).

I check if the socket is all digits
* only integers 0 and larger would pass this test.
I then check if the string is less than or equal to the maximum port number.

By using "if($socket)" I make sure socket isn't false, empty, or the string '0'.

I don't believe I need to initialize $port because $port will always be set if $socket is true. Please show me if I am wrong here. Thanks
Inline $port expression, getting rid of $port variable.
Extract common variables of $connectionParams.
Move check for : to where it belongs, getting rid of $socket = false;
Move getValue() to where required. This actually is not required "global data".
No need to check the port number as this will fail anyway.
Rename variable to indicate that it can be port and socket.
Don't specify host when using a socket.
Merge pull request #9018 from owncloud/dbms-socket-support

Refactor OC_DB::connect() to properly support sockets.