Move db-specific option logic to backends

ALso move --port which is not a backend option out of the backends
Merge branch 'port_option' into gsoc13