(TWILL-80) Perform log force flush correctly. Also there are refactoring around
service starts/stops for container (both AM and runnable) to have a cleaner view
on the service dependencies. The help making sure unregistration to RM is done
last on AM, providing a more accurate view for RM.