fix environment between tests so they reliably pass

/cc @ianstormtaylor @yields all the tests pass now in phantomjs. it all came down to fully clearing the environment between tests:

- clear cookies
- clear images
- clear scripts

### clear cookies

this could be a lot cleaner, not 100% sure how this even works, the component/cookie module is kind of wonky

### clear images

this works

### clear scripts

this seems to work in phantom, but it doesn't get rid of the errors in chrome when a jsonp file loads a script and calls a variable that has been deleted. in phantomjs, deleting the script seems to stop the script from executing which is perfect! but not sure how this will work in other browsers. but it's a decent solution for now.

thoughts?