Add testing around fieldwork sync

The main motivation was to add testing around the fieldwork sync, but this lead to some further changes. 

Additional changes include:
1. consolidated code to show alert view when sync error occurs
2. expanded `FieldworkSynchronizeException` to include short reason and details of exception
3. reworked how proxy tickets are obtained so it's cleaner and easier to test.