Inherit configuration from the current test class

The current test class may be different from the declaring class of the
test method if the test method is in a superclass.

This makes it possible to have an abstract test class and then extend it
with multiple subclasses that specify different qualifiers in @Config.
Made ShadowPreference call real object constructor.

This ensures that Preference objects set their private Context member variables correctly. Allows PreferenceFragments to be added during the lifecycle of the hosting activity.