Refactor abc::detail::scope_trace to store variable tuple externally

Use virtual methods instead of std::function instances; this should result
in an even lower cost in case no exceptions are thrown, and at the same
time allows for creating a linked list of scope_trace instances to allow
walking the stack.