Build with gradle and add IDEA files to ignore

As per request gradle build in a separate PR.

In the previous patch request I actually manually removed the gradlew as I have this pet peeve about generated artifacts in the repo.
By adding the source encoding in the gradle file I got the project to build successfully.
The following line will do the trick:
```tasks.withType(JavaCompile) { options.encoding = "UTF-8" }```

Could you also please add the gradle wrapper to the build.gradle i.e.
```task wrapper(type: Wrapper) {
    gradleVersion = '2.1'
}```