Guard against bad parameter to gnc_plugin_page_invoice_summarybar_position_changed.

This avoids the crash in bug #710979 but doesn't fix the underlying problem.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23346 57a11ea4-9604-0410-9ed3-97b8803252fd
Remove some unused includes

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23347 57a11ea4-9604-0410-9ed3-97b8803252fd
Remove gnc_build_book_path from swig interface file

It hasn't been used in guile since 2006

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23348 57a11ea4-9604-0410-9ed3-97b8803252fd
On file open, only destroy a previous session if really exists

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23349 57a11ea4-9604-0410-9ed3-97b8803252fd
Move state handling code to separate file and improve on it

- keep the state information in memory while gnucash is running
- upon saving the state, only delete those sections that will be
  recreated by the save_all_state function

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23350 57a11ea4-9604-0410-9ed3-97b8803252fd
Re-implement state save/restore functionality in gnc_tree_view

The new implementation uses the gnucash metafile in .gnucash/books
to save gui state for any page that is based on gnc_tree_view.

Think Account Hierarchy, Budgets, Vendor/Customer/Employee overviews.
Each of these sets a unique name for a state section that the tree view
will use to store column width/visibility, sort column, sort order.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23351 57a11ea4-9604-0410-9ed3-97b8803252fd
Remove function that no longer adds value

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23352 57a11ea4-9604-0410-9ed3-97b8803252fd
Fix crash when deleting budget

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23353 57a11ea4-9604-0410-9ed3-97b8803252fd
Cleanup leftover from state save/restore re-implementation

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23354 57a11ea4-9604-0410-9ed3-97b8803252fd
Some white space and comment improvements

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