Improve print all exceptions option

With this patch we'll print the exceptions up to the function that catches them (it helps us while debugging).
I've changed the output format to the format that Throwable.java uses.
I've added some tests for nested exceptions (we didn't have one!) and finally clauses.
Nit: this was in the original as well, but since detailMessage is declared, you can concatenate it conditionally more simply:

    return className + ": " + (detailMessage || "") + "\n" + stackTrace.join("\n") + "\n\n";