Fix a long-standing bug where the `synapse_port_db` script could fail to copy rows with negative row ids.