Implemented API factory with sharted states. Refactorings.
Merge branch 'master' of github.com:md5crew/2safe-daemon

Conflicts:
	SafeDaemon.cpp