Filter and sort $wgBabelCategoryNames correctly for Babel extraction

Change-Id: Iaf08f4448d1a9f5141717684b6794e418f1262f6