Do you know of any decent way to save the layout / history of each term window? Or more generally, the state of X desktop, to be able to reload later / have several "workspaces" set up for different sets of tasks?
Session management has been a part of X desktops for a long time, but a few years back it was hidden from the primary UI and some (many?) apps stopped supporting it. You can still find the options buried somewhere in the system settings for KDE/GNOME/etc. Unfortunately it doesn't save your ssh sessions, but you can use preset tab sets for konsole to help with that.
If you use tmux, there's tmuxinator that uses a YAML file to describe the initial setup for a tmux session.
The Mac OS X terminal also saves and restores the window position, working directory, and scroll back of each terminal.