wmflib: update require_package()

Ensure the package resource is created in the scope of its container class,
rather than local scope.

Change-Id: Iaf4438ea406c579ce0c42dd80c94b373502307c2
Merge "wmflib: update require_package()" into production