GlobalBlocking right now is hardcoded to not allow anything higher than /16, and has no limits for IPv6. It should use $wgBlockCIDRLimit instead.
To allow for message reuse, this mostly copies the CIDR-handling logic
from ApiQueryBlocks into ApiQueryGlobalBlocks, which has the side effect
of making it actually work for IPv6. Too much refactoring of the rest of
the code would be needed to properly solve T46836 for me to do right