Fix NPE when stopping KeyAgreementTask, improve thread safety
This branch fixes #696 (closed) and improves the thread safety of the camera code, mostly by adding @UiThread annotations and occasionally by moving stuff onto the UI thread that might have happened on other threads before.
Closes #696 (closed)