Bug 710905 - Column withs, visibility, order and sort order not saved and restored

This commit restores the functionality for register and register2.
As before saved state from 2.4 won't be migrated

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23430 57a11ea4-9604-0410-9ed3-97b8803252fd
Register2: improve sort functionality

- reduce state file access to one location (tree view)
- at runtime, let model keep track of the sort state (it needs it
  the most for its query)
- the view code can read the sort state from the model when needed
- reuse state handling code in gnc_tree_view where possible to avoid
  unneeded code duplication

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23431 57a11ea4-9604-0410-9ed3-97b8803252fd
When an account or budget is deleted, drop any associated saved state

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23432 57a11ea4-9604-0410-9ed3-97b8803252fd