add gradle as build tool

- add build.gradle
- add gradle wrapper for unix and windows
remove trailing white spaces
update gitignore for gradle
configure travis to skip install phase

- replace pre_install with install so it won't run gradle install phase