Change state machine from "A -> B -> C" to an queue of actions

The old machine would always go from SyncBlockchain to SyncUtxoset to SaveToDisk.
This is an awkward design and does not allow independence of actions. We rework
the state machine to use a queue so that if multiple actions are required in series,
they can all be pushed in a row, rather than being aware of each other.

This lets us call `SyncUtxoSet` after receiving a new block, doing the right thing
with regards to stales or reorganizations.
Resync chain rather than using `getblocks` to sort out orphans

This should be a more reliable way to handle cases where the wallet and
its peer get out of sync.