setup: changed config file mode bits

Changed the configuration file mode bits from 600 to 644 for the
/etc/inboxapp/config.json and /etc/inboxapp/secrets.yml configuration
files to avoid issues when starting bin/inbox-start.
Merge pull request #96 from filipposironi/master

setup: changed config file mode bits
[build/setup.sh] Add libsodium setup to install flow.

Summary:
Workaround for the "error: sodium.h: No such file or directory" bug in
pynacl and/or cffi: https://github.com/pyca/pynacl/issues/79

Fixes https://github.com/inboxapp/inbox/issues/95

Test Plan: `vagrant up --provision` from scratch

Reviewers: charles

Reviewed By: charles

Subscribers: mg

Differential Revision: https://review.inboxapp.com/D635
Ensure we can log message decoding errors from non-ASCII folder names.

Test Plan: Regression test added.

Reviewers: kav-ya

Reviewed By: kav-ya

Differential Revision: https://review.inboxapp.com/D636
The one where we create a special case just for iCloud

Summary:
iCloud is pretty weird: sending an email from SMTP/IMAP doesn't save it under the "Sent". This patch introduces a special case for iCloud and a new action to save a message (`save_sent_message`).

I'd like to have your opinion on this, especially about the default vars I added to make things work.

Test Plan: Ran test_sending.py and checked that two files were created.

Reviewers: kav-ya, emfree

Reviewed By: emfree

Projects: #sync-engine

Maniphest Tasks: T478

Differential Revision: https://review.inboxapp.com/D631
Add BaseMailSyncMonitor._cleanup()
Move thread state fns out of BaseMailSyncMonitor.

Update bin/clear-db.

Summary: Matching changes to D629.

Test Plan: None

Reviewers: emfree

Reviewed By: emfree

Differential Revision: https://review.inboxapp.com/D632