If the mainData gets corrupted, reset it

There was an error in the wallet database that truncated some user's mainData when their contact list got really long.
When the mainData fails to decrypt, reset it. The contact list will be rebuilt automatically.

Fixes #566.