Add a regression test to ensure capture completes the document.

- Fix a bug in the `restore` method.
- Make the `scriptsCorrectOrder` test behave nicely with other listeners
Capturing complete test fails on timeout.
Merge branch 'v2.0' into v2.0-readystate-bug-test

Conflicts:
	.gitignore
Merge pull request #130 from mobify/v2.0-readystate-bug-test

Add a regression test to ensure capture completes the document.
Merge branch 'v2.0' into v2.0-swift-feature-branch

Conflicts:
	.gitignore
	src/capture.js