element: Add `catch_panic_future()` helper function for subclasses
This allows wrapping a future in a way that panics are converted to error messages on the object.
This allows wrapping a future in a way that panics are converted to error messages on the object.