Finally implement the looping editor

The looping editor, used when the Emacsclient cannot be used.

This fallback is used for asynchronous process started inside the
macro `with-editor`, when the process runs on a remote machine or
for local processes when `with-editor-emacsclient-executable` is
nil (i.e. when no suitable Emacsclient was found, or the user
decided not to use it).