Optimize Travis CI file caching

- store ivy cache
- don't store the whole ~/.sbt foldertree in S3
- add a new trick to avoid unnecessary ivy cache uploads

Follow up of #867.