Travis support for PRs and master, stable5 and stable6

Continuation of #8913
:-1: on splitting this into multiple files - please keep all in one script - in the current state I don't want to diverge too much from autotest.sh

@bantu before you start crying - I'm aware that  these pieces need refactoring - but not now.

@MorrisJobke please move the oracle script back into the one big prepare script and please squash.

THX