Bug #682280 - bill/invoice importer fails to save imported bills/invoices

The first attempt to commit when creating the invoice failed because
the commodity had not yet been set. Wrapped the creation routine in
begin/commit to allow the invoice to be fully populated before trying
to write the DB.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@23166 57a11ea4-9604-0410-9ed3-97b8803252fd
Fix up state-changing business functions

To ensure that they all have a begin/commit and mark the instance
dirty so that the change is immediately written to the DB.

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