Script to figure out what is the appropriate ref for any given MAJOR.MINOR semver

The version is compared against cakephp/cakephp repository in this order:
 - Check VERSION.txt file on master branch
 - Check if any branch names matches the version
 - Check if any tag names matches the version

Example:
```
./latest_ref.sh 1.3 // outputs 1.3 (branch)
./latest_ref.sh 2.0 // outputs 2.0.6 (tag)
./latest_ref.sh 2.4 // outputs master (as it is the latest stable release)
```

That prevents us of having to update the travis file every time the master branch changes, or when a branch is removed.
Instead we can just have `2.0` which will be translated to the right ref, 2.0.6 tag in this case.

More information: https://github.com/cakephp/datasources/pull/56/files#r6502358