Register CategoryTreeMagic from global scope instead of setup
I don't know how or why, but this late way of registering magic
words from within an extension setup function is sometimes
causing people's install to fatally crash on:
Exception from line 318 of mw/includes/MagicWord.php:Error: invalid magic word 'categorytree'
Just move it out of there into a plain and simple registration.
The parser function itself is still registered conditionally.
(cherry picked from commit 8d7de84017d3f8efb6bfb5265665aa4907767cde)