Keep track of seen, uncaught JavaScript errors

Keep track of seen, uncaught JavaScript errors and only post them to the
server if an error has never been seen before.

This should reduce the amount of traffic to the server, the amount of
email if we're doing email notifications on these kinds of errors, and the
load on the browser making all those requests.

Closes #635