Handle calls to snippets/actions with empty history

In order to reduce error handling in snippets/action, we introduce
a HistoryEmpty excpetion that is raised whenevery history.top is
accessed with an empty history. The MultiPicker then catches the
exception and tries to keep going.

If your snippet has any sideeffects that do not get collected when
the stack unwinds, you should really handle them on your by catching
the exception and then reraising.