Convenience methods for running code in the UI or VaadinSession context (#11219)

Change-Id: If31a965f925ca2bedb25c712b83ccb070a9e71a0