v52: Add getPackageNameDuringConstruction() method

App Settings (and possibly other modules) didn't work correctly anymore
since 98619db817207a0dc3d92caf105341d713658682 changed the way XResources
objects are created. One of the intentions was to avoid calling the
constructor again. However, App Settings hooks a method which is called
inside the Resources constructor. This constructor is still called once
for the original Resources object, but obviously XResources.getPackageName()
can't be used for this object.

This new method can be used to fill this small gap between the creation of
the Resources object and its conversion to XResources. It will throw an
IllegalStateException if called from somewhere else.