Plugin check should check for extensions too

It is possible to subclass the "android" and "android-library" plugins. Using "withType" instead of "hasPlugin" will match these plugins.

For example, the [DexGuard](https://www.saikoa.com/dexguard) plugin subclasses and replaces the android plugin but "hasPlugin" still returns false.