travis: make Travis script self-contained, except for build script

Signed-off-by: George K. Thiruvathukal <thiruvathukal@gmail.com>