test: code cleanup

Fix issues found by bnoordhuis in the code-review of recent change
'debugger, cluster: each worker has new debug port'.

This commit can be squashed with the forementioned one.