testing: test host validation

We are going to need some nginx-specific system tests, and this seemed like a good place to start.  This adds two tests, as well as some infrastructure.  Currently only the first test passes, but the second one passes in apache and should pass in nginx once we fix the hole in resource fetching.