Fix cancel from locked + tests (bug 963640)

Added some tests to cover clicking cancel to close the payment flow. 

This exposed that the timeout was calling render as well as checking paymentFailed. Moving the render call outside the timeout that waits for paymentFailed to be injected fixed that.