Fix failing "app destroyed during token refresh" test (#6014)
Fix failing "app destroyed during token refresh" test (#6014)

* Added error_handler for occasionally failing test

* clang format

* Updates from review
realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core,realm/realm-core