Make lottery-based default permission level check safer

There is a potential problem with page output being cached.
The page outputs javascript variable aftv5Article, which contains a key with the default permission level.
This is correct, however this key will not exist for as long as the page's output is cached.

Basically, there are 3 checks that will define if AFT is enabled:
* Whitelist/blacklist category: if category is added, page's output cache is purged -> if this changes, the change is picked up
* Opt-in/-out: just added, cache will now be purged
* Lottery: this is not on a per-article basis, and we can't just purge al pages' caches = we should not rely on data that can potentially be cached

If AFTv5 were to be added to a new wiki, whose pages' outputs are cached, via a 100% lottery (=enabled everywhere), the form would only show up once pages are being updated and their cached purged.
Changing the check for default category also to JS duplicated some code, but at least we can now rely on it being accurate: we don't have to rely on the cache to reflect the new changes, we can calculate it from the article ID.

Bug: 49347
Change-Id: I891d9a5c9f2359ff6bd8160bd0cf3fe775c3af0d
Merge "Make lottery-based default permission level check safer"