Abstract out the life cycle management code out into it's own abstract class and reuse it in classes that provided the same kind of functionality.

git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk@1596001 13f79535-47bb-0310-9956-ffa450edef68
Move the LifeCycleState enum in the LifeCycle interface.

git-svn-id: https://svn.apache.org/repos/asf/logging/log4j/log4j2/trunk@1596005 13f79535-47bb-0310-9956-ffa450edef68