detect mw configuration errors in header

when fetching stats, and getting a 500 error,
sometimes it's a genuine 500 from the webserver,
sometimes it's one from Mediawiki itself telling
us things like (most of the times) that API is disabled
or that the PHP version is wrong

detect that and set custom error code 999 for that

Bug: 54161
Change-Id: If864a901ff908efe505bcd0625cf51c0e921e901