Add `safe_sync` option to synchronous workers

This commit adds a safe_sync option that allows workers to dispatch
their jobs in an exception-safe manner. This will allow async jobs to
fail for whatever reason when being run in a synchronous context.

Change-Id: I4830aad7b4d37752dccf471df3fa8196ba5d6e9f
Reviewed-on: https://gerrit.causes.com/25105
Reviewed-by: Shane da Silva <shane@causes.com>
Tested-by: Tony Wooster <tony.wooster@causes.com>