Move the logging of exceptions before the logging of backtraces

When -Xlog.backtraces=true and -Xlog.exceptions=true are used together the backtrace is logged before the exception, which is the opposite of what you would expect, and makes the output harder to understand.

This moves the logging of exceptions to before the code that triggers the logging of the backtraces.

This is not a fantastic solution, there’s nothing in this change that makes sure that the order stays this way, as soon as someone else does a refactoring of the code this will probably become inconsistent. However, I’ve followed the code to find out how the backtraces and exceptions are logged, and this change is the only one I could come up with that wouldn’t require a much more dangerous operation.
Merge pull request #2110 from iconara/log_exceptions_before_backtraces

Move the logging of exceptions before the logging of backtraces
[Truffle] Tolerate bad detailed source sections by just using the line.
[Truffle] Raise NameError in #method_missing if it came from a VCall.
Fix #1943: Setup keyword args properly for super

* Separate out keyword args from non-keyword args in IRMethod and IRClosure
  and build a list of <key, value> pairs which are then used to set up
  a Hash operand (but with a isKWArgsHash field to deal with the
  keyword rest arg hash specially).

* This fix automatically makes everything work.

* This is a quick first pass.
  - JIT needs to deal with the isKWArgsHash field.

  - The hack of adding the keyword rest arg hash with a dummy symbol
    could be replaced with a new field in IRClosure and IRMethod.

  - The boolean in Hash should be removed and we should use
    a subclassed operand just for this use-case.

  - Requires more testing.
  - Requires specs / tests.
[Truffle] Include the call node in the panic AST trace.
[Truffle] Fix lambda #call with a block.
[Truffle] $VERBOSE.
[Truffle] Refactor ReferenceEqualNode with @CreateCast.
[Truffle] Refactor Fixnum#<<.
[Truffle] Document lookupConstant().
[Truffle] Move translateCPath next to visitConstDeclNode as they are closely related.
[Truffle] Only check once for presence of a lexicalScope.
[Truffle] Avoid looking twice the same module.

* And make LexicalScope fields private.
Reverting this for now.  IRRuntimeHelper impl should not return warnings or errors and then I can reland (colon 3 broke from private constant test)
current MRI prepend implementation
gross hacks
one more tweak