varDump update

This adds support for dumping Error objects via varDump. Mostly useful for Scaffold, if you want to dump an error (patch coming).

It also prevents XPCOM objects, like nsIDOMDocument for instance, from getting dumped, which is generally good. I was thinking that we could add a hidden flag for debugging purposes. I don't recall ever wanting to dump XPCOM objects though. Otherwise, I guess we could just convert them to string implicitly.

Lastly, this refactors the code into something more comprehensible.
Well, it could be a bit much when outputting object properties and we're not actually outputting function contents currently https://github.com/zotero/zotero/pull/599/files#diff-a098326f7cdaa37adf1398d92b384be5L1236