Refactoring some of the shared code between the PORT and PASV handlers into
a single API.  This helps clean up the code, make it more legible, and help
prepare the way for supporting EPRT/EPRT.