Fix third party app access to provider

Fixes two issues
1) An exception in the query can cause the semaphore to never be released,
this is now handled in the finally block
2) Binder identity was not cleared preventing access to the EmailProvider