Make dumpJson.php robust against failures.

This introduces an ExceptionHandler interface to handle
exceptions in a way other than throwing them. This is used
to continue processing after logging errors that may occur
when generating a (potentially very large) json dump.

Change-Id: I282d5304e584c48355950de7011c90dbe60f52e3
Merge "Make dumpJson.php robust against failures."