PLA-1549

Wrap global state and end the misery (pun intended) of categorymembers
core api.
also I'd say  ```array( 'wgMiserMode' => false )``` should be switched to ``` array( 'wgMiserMode' => $this->somethingMoreDescriptiveThanMiserMode )```
because otherwise you hide the ability to switch modes