Rewrote several libraries to have better memory management
And a lot more memory optimilizations. Beware possible over eagerness in freeing memory and thereby a crashing daemon.
Merge branch 'master' of https://github.com/pilight/pilight

Conflicts:
	daemon.c
	libs/config.c
	libs/gc.c
	libs/options.c
	libs/protocol.c