add try catch to all functions on struct mapistore_backend
use execinfo.h to get backtrace

Really poor backtrace because it will only have the frames from oc side,
I don't know why callStackSymbols is returning null, compilation flags?
Revert "Merge pull request #2 from Zentyal/jgarcia/fix-encoding-of-mapistoreuris"

This reverts commit 876a9c7db0d74ba6ef6bd32cf818186b7f44d7d9, reversing
changes made to 800078920c168c9324dca2f002dc8ad440ad4bc4.
oc-sogo: try/catch to guard only the actual impelementation rather than *everything*

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
oc-sogo: Clean up AutoRelease pool and unregister threads in Catch handler

Most of the time we have "not yet implemented" kind of exceptions,
so it is better to clean up allocated resources

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
oc-sogo: Use [e name] and [e reason] selectors

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
oc-sogo: Move memory clean up *after* handling the exception

Otherwise the mess is full :)

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
oc-sogo: Print both [NSException callStackSymbols] and execinfo.h stack trace

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
oc-sogo: pretty print Exceptions in sogo_backend_handle_objc_exception()

Now we have a nice stack trace printed out from [NSException callStackSymbols]

Signed-off-by: Kamen Mazdrashki <kmazdrashki@zentyal.com>
Merge pull request #7 from Zentyal/kamenim/exception-handling-oc-mapistore-backend-functions

exception handling oc mapistore backend functions
Merge branch 'master' into saucy