src/Makefile: Link rrdcached against ALL_LIBS directly.

rrdcached uses glib and, thus, needs to be linked against the lib directly.
While some linkers work fine since librrd_th is linked against ALL_LIBS, some
other linkers don't.
Fixed various unused variable compiler warnings.
Fixed invalid type conversions.
rrd_daemon: Fixed the resolved_path argument passed to realpath().

The function expects a character pointer, not a pointer to an array of
character pointers.
Merge pull request #460 from tokkee/build

Fixed various compiler warnings