Add unix socket support for SphinxAPI connection

Feel free to edit the comment as needed, I'm not a very good writer, lol.

I also replaced is_numeric() with ctype_digit() because it is a faster/simpler check that is also more accurate when dealing with ports.