Improve comparison of HTML in tests

Depending on the version of libxml you have installed, the HTML
generated by nokogiri can have slightly different whitespacing. This
changes the tests to check the markup for equivalence, rather than
direct string comparison.
Don't use nth-child with capybara/nokogiri

Depending on which version of libxml2 nokogiri was compiled against,
the nth-child selector can be unreliable. This is resolved in nokogiri
1.6 onwards, but until we can use that (slimmer is locked to 1.5),
these fixes get the build green again on vanilla Mavericks.
Merge pull request #1048 from alphagov/more-robust-html-comparison

Test suite robustness