Replace a bunch of extension_loaded() checks with checkPHPExtension()

Change-Id: I7bd9bc3a753975f45e63532d4f07aeff853b9970
Merge "Replace a bunch of extension_loaded() checks with checkPHPExtension()"