Hookup API for pin state and mock it for testing (bug 986100)

This adds the API check for pin state and the mocks the same for the casper tests to validate the routing is working as expected.

I've also fixed some nits with how the login checks affect routing such that this should stop the need to force render the views.

Casper has some new helpers that inject sinon so that the API responses can be mocked and tweaked to create specific states.

Oh and there's some styles for telling apart the dev/test server run instance and the webpay hosted version (just for my sanity as I'm needing to run both side-by-side as I flesh this out).