x64: fix exception stack restoring

Exiting from the second exception (exception_depth == 2) should restore
the exception stack to percpu_exception_stack[0], which was the value
used before the second exception happened.

Reviewed-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Tomasz Grabiec <tgrabiec@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>
x64: Fix nested exception support

Commit 89464d6a037dd06ac5ca37f0c70a65786193866a added support for
nested exceptions. One of the reason these are needed are when using
tracepoints keeping backtraces using backtrace_safe(). If the tracepoint
happens while handling an exception, the call to backtrace_safe() might
itself cause an exception, and while handling *that* nested exception
on the per-cpu nested exception stack, we need a second nested exception
stack (that second stack will only ever be used to print a "nested too deep"
error).

However, the existing code had an off-by-one error in its test, and
actually aborted on the nested exception, when exception_depth=1,
rather than setting the exception stack to precpu_exception_stack[1]
as it should, and only aborting when exception_depth reaches 2.

So despite the aforementioned commit, we did not actually support nested
exceptions.  Turning on malloc tracing with backtraces, with the kernel
arguments "--trace=memory_malloc --trace-backtrace", quickly resulted in an
abort. With this patch, that tracing no longer aborts.

Signed-off-by: Nadav Har'El <nyh@cloudius-systems.com>
Signed-off-by: Pekka Enberg <penberg@cloudius-systems.com>