Split .travis.yml actions into shell scripts

Travis CI recommends to keep all extensive steps in shell scripts and
keep .travis.yml minimal.
It is easy to syntactically break .yml file.