Reorganise the requestAnimationFrame loop to handle errors correctly

Since 413dac94b396b6b55da94ace6cd8efd9b43c1d12 errors are no longer
caught by default, which is a good thing for exposing user errors.
However, the current structure of the main fastdom loop means that a
single user error will mean that the loop will never be run again, so
jobs will continue to be added to the framelist but never processed.

This reworks the main loop to handle fastdom tasks first, ensuring a
consistent and robust state, and then running the user code where it
can error safely.
Add tests to prove error handling bug
Merge remote-tracking branch 'rowan/master' into error-handling
Alter tests to catch errors in existing methods
Wrap rAF for testing do that we can catch errors and prevent them hitting the test runner
Merge pull request #37 from wilsonpage/error-handling

More robust error handling