db: remove the maxIdleTime thing

It doesn't help much, and leads to bad code.
provision/docker: move the agentPort function
auth: use copy of connection in TearDownSuite
provision/docker: get IP from docker to execute commands

Closes #530.