Add support for dependent preferences.

Pull request: https://github.com/robolectric/robolectric/commit/d61f0d61a95598d8aedf8add4ea14a8aad6ab3c4 caused dependencies to be set
when specified in the resources file. This was causing Preference.registerDependency() to throw an IllegalStateException since
no PreferenceManager was set with which to look up the dependency.

1. Added a dependency preference in preferences.xml which exposes this bug.
2. Fix bug by reflectively calling onAttachedToHierarchy() passing the PreferenceManager down the hierarchy of preferences.