Return an exit code on error

This allows an errback to be optionally passed into compile_project. The
roots binary then takes advantage of this functionality to pass in an exit
handler. I was able to test this, but not as thoroughly as I liked,
because evidently our marketing project in its current form doesn't work
with the transformers branch.

This commit is cherry-picked off of feature-exit_code, which was based on
the transformers branch. I then added tests off the cherry-pick.