Use clear_events, do not assert.
Do not use create_renderer from a separate thread

Also moves functions from tests.test_config_reload to tests.lib.config_mock

Using create_renderer for vim results in vim access from a separate thread.