Add undo functionality to the performance-log viewer, which allows undoing/redoing changes to the sample selection, and the call-graph state. (cherry picked from commit 6ad3dbdb)