Issue 128: Check if classes are available on classpath before loading

Fix for #128 

The resource set is created depending on the availability of the interface and implementation classes on the classpath. The names of the classes have changed since Gradle 2.2, both the plugin needs to support both pre-Gradle 2.2 and Gradle 2.2 and later versions.
This could be done less expensively by checking the current Gradle version from `GradleVersion.current`.
```
if (GradleVersion.current < GradleVersion.version('2.2')) {
   ... do pre 2.2 stuff
} else {
  ... do 2.2+ stuff
}
```
Then we don't have to incur the cost of throwing an exception.