Conversion to Gradle and code cleanup

Also fixed a compatibility issue when the library is used on versions prior to API level 16 which resulted in a crash. See here:

https://github.com/plackemacher/TabBarView/blob/master/library/src/main/java/com/mirko/tbv/TabBarView.java#L169