Frameworks/base: Stop profiling on uncaught exception

When "handling" an uncaught exception, make an attempt to stop
profiling. In case profiling was active, this will avoid losing
the profiling buffer.

Bug: 26291225
Change-Id: Ie5f5517b46ed89d0456a4aac9d4ff3b713d1d8aa
2 files changed