Restricted the Travis builds to some branches only

We don't want Travis to build feature branches created in the main repos, as these feature branches will always have a PR which is built as well.
Travis will now run builds only for the master branch and for branches named "x.y" where x and y are numbers (to let us create maintenance branches for releases if needed), and for pull requests sent to these branches.