This is a rebased series of patches from pull request #335
Fix the synchronization of sending addresses between a CWallet and its associated CWalletDB (this was reported independently in Issue #350).
Add a check for validity of sending addresses (Issue #328).
Avoid propagation of unnecessary updates to CWalletDB.
Fix the behavior of setaccount on sending addresses that are already listed in the Address Book. (Issue #329).
Add wallet methods GetDefaultAddress and SetDefaultAddress (contributed by laanwj in Issue #350).