Made the sock_mutex static since it's not referenced outside the file.
Changed the data types for some of the variables.
Cleaned up the readline function (changed data types and removed
variables.)
Added mutex locking around the dnscache() call.
Removed the global sockaddr and setup_fd variables.
Added the socket_blocking() and socket_nonblocking() functions.
Gutted the readling() function and replaced it with something similar to
the 1.0 version. :)