Improved the console history:
- separate history for each pif (name)
- store the history in the workspace
Fixed wrong listener registration when switching the pif and the corresponding history in the console.