Run optout global.sql last and fix queries

- global.sql needed data from all the other wikis to be populated first
- The global query wasn't summing values
- The percentage calculations were incorrect,

Change-Id: I811edb541071fbb921851269d6e3fb666c8cf44e