Use ExtensionRegistry rather than class_exists()

It also removes an old piece of code that is for MW pre-1.27 which
is irrelevant because the code base now requires 1.30+

Change-Id: Iaac4ef204f132bfb319320a67f4d5c54f5b194b3
1 file changed