Fix: run everything in the same thread event loop
When connected to an actual server, a runtime error was raised with the message: "Leaving task {task!r} does not match the current task {current_task!r}." My guess is that this was caused since the normal client calls were made in the main thread, and the event loop was running in a separate thread.
With this commit, all asyncio calls are made in the event loop thread.
Following this change, some other warnings and errors poped up. These are also fixed with the MR.