Add support to set exceptionhandler

Uncaught exceptionhandler can be set to the OpenGLEN thread, on android
this is used for Google Analytics reporting of stacktrace in an uncaught
exception.