Move the code from the connection_or module to ext_orport. This commit only moves code: it shouldn't modify anything.