Lite: Capture stdout and stderr from the main thread (#9984)
* Add stdout and stderr events
* add changeset
* Refactoring
* Format App.tsx
* add changeset
* Add python-error event to capture Python errors occurring in the running event loop after the initial app launch
* Fix <ErrorDisplay />'s close button
* Fix <ErrorDisplay />
* Propagate python-error and initialization-error events to the controller
* Add init-code|file-run-error events
---------
Co-authored-by: gradio-pr-bot <gradio-pr-bot@users.noreply.github.com>