Process management

Please close https://github.com/DataDog/dd-agent/pull/400 and comment on this one. There are refactoring and @alq666 @MisterRayCo This one contains most of the fixes you suggested.