JBTM-1565 - Use a random port for socketserver and txn_cfg when port 0 i...

...s given in config

now squashed to one commit.