Some tests use more ports than just the query and control ports.
Each test that can run in parallel with other tests is now assigned
a unique block of 10 ports.
(cherry picked from commit e0ff77f9d3)
(cherry picked from commit df1348ad2b)
(cherry picked from commit c64af8abe5)