add gradle as build tool

- add build.gradle
- add gradle wrapper for unix and windows
remove trailing white spaces
update gitignore for gradle