Make sync more resilient and prevent/reduce decryption errors
We had some decryption errors in Circles. It turns out those were mostly due to Circles state management bugs that stopped us from syncing.
This MR brings changes to make sync more resilient to failures, and to make decryption errors less likely.
- Don't ever intentionally stop syncing without being told to do so. If there is a failure, just wait and then try again.
- Modularize the code the calls crypto functions, so we can call it both from sync() and from send()