Fix a NPE with Fragment#setUserVisibleHint

Fix a bug where calling setUserVisibleHint(true) before a fragment is
attached to a FragmentManager would throw NPE. As the same fix has
been made in frameworks/base, adjust FragmentCompat to guard against
the pre-existing bug in older platform versions.

Bug 27250018

Change-Id: Ifc72f2f16e728414e3ecd80fd34b933bcad73729
4 files changed