adding JSErrorCollector support

Hi
I applied the changes to the master branche. I hope it is correct now.
https://github.com/thucydides-webtests/thucydides/pull/70#issuecomment-15825608