cluster: ensure we release the command when we are done with it.
tests: plug a couple small leaks.