split init() in multiple methods

This allow better granularity over agent behaviour
transfer control in caller
transfer control in caller
call daemonize() last
merge methods
transfer control to caller