Make Logger and UsageReport more thread safe

Change-Id: Idd0b8fc503daf7df1d678a1e1674cd61f96463e7
Make exception reporting more thread safe

When an exception occurs on a background thread ideally it should
be handled by the application. However, not all applications are
always implemented to do it that way, so we need a safe fall back
that doesn't pop up a dialog from a (non-UI) background thread.

This implementation creates a control on the UI thread in order to
be able to check if invoke is required. When an exception occurs on
a background thread we push the exception data to an exception data
stack and try to invoke the exception dialog on the UI thread. In
case that the UI thread already shows an exception dialog we skip
the exception (similar to the behavior we already have when we get
an exception on the UI thread while displaying the exception
dialog). Otherwise we display the exception dialog, appending the
messages from the exception data stack.

Change-Id: I20ae5cb4e84a3ba4baf81fae7366f22c8c83e0a8