Regularly check the user connection status when creating a wiki
Created by: edg2s
This allows us to cleanly delete the wiki if the connection is closed. Previously the wiki would just be left half-created.
We can't just use register_shutdown_function as that could fire during a shell command and delete the wiki while the command is still running.
Fixes #332 (closed)