Move some stuff to the couchjs code
Support a specified debug port via an environment variable