Reconsidered handling of lexical scopes in policy execution

When defining variables in different phases of a policy and storing them using `policy-setf' and `policy-get', their lexical scope is now handled properly and they are available at all times.
Changed the semantics of the `on-fail' hook from `condition' to `datum'.

Up to now, the `on-fail' hook (executed when a failure is happening) transported the `condition' value of the failure, which is less information than the actual `datum' variable that becomes available when the error comes up. The `datum' variable includes not only the failure name and class, but also the package it is originating from. For the sake of completeness, this is now used as the parameter for `on-fail'. After double-checking neighbouring code in the CRAM stacks, nothing besides `cram_beliefstate' actually uses this callback hook.