Improve acceptance tests
Add an actual agent run to each test, to confirm that the master is able
to serve requests in some basic capacity. Would have caught the "unicorn
/ nginx support broken" issue where ssl headers weren't passed right.

Also moves some of the tests into common blocks to reduce duplication.