Fix configure and makefiles so build process is more robust

Concurrency kit is installed by default into /usr/include/ck
so pkg-config is used to find the headers and libs instead
of overriding the CK location using --prefix=/usr.

When Riemann was enabled during the build process Google
Protocol Buffers was being incorrectly linked to the ganglia agent
eventhough it isn't used. This should now be fixed.