Use mergeMwGlobalArrayValue in GenderCacheTest

Also move the global setting to addDBData to let the test work
correctly, because the global is used indirectly in User::saveSettings.

Change-Id: I986d3a28e4fcc82ed84886c2970571e9fa6128be
Merge "Use mergeMwGlobalArrayValue in GenderCacheTest"