Add FragmentLifecycleCallbacks

Add a new callback object that can be attached to a FragmentManager to
observe all fragment lifecycle events within that
FragmentManager. Useful for dependency injection and other
shenanigans.

FragmentLifecycleCallbacks can be registered as recursive, in which
case they will be activated for any lifecycle events that happen in
descendant FragmentManagers as well.

Test: ../gradlew connectedCheck [from fragment/]

Change-Id: I19af51fb98dea54628781676a3c25090626df547
4 files changed