WIP: Refactor to use an intermediate sexp representation

Based on https://github.com/travis-ci/travis-build/pull/319

This will be the new sexp branch. I'll port changes from https://github.com/travis-ci/travis-build/tree/sf-sexp step by step. Closing https://github.com/travis-ci/travis-build/pull/274 in favor of this one.

Please do not merge.