Close open sockets
Make client into library
Added more files to ignore
Moved cmclient executable to test directory
Moved base CXXFLAGS values to configure.ac

This is to help have a consistent base on all compile locations
Modified how checking for log4cplus is done