app: don't hold a direct reference to actions in the action history
Instead, store only the action's name, and look it up upon searching. Keeping a reference to the actions in the history extended the lifetime of actions that sohuld have otherwise died, leading to all sorts of nastiness. In particular, the Alt+[n] actions to switch between images would remain bound to their accelerator after the image has been closed, holding a dangling display pointer, which would lead to a segfault, or fail with a CRITICAL message, when using the accelerator again.
Showing with 33 additions and 36 deletions