tst_qthreadpool: fix memory leak

Task-number: QTBUG-22673
Change-Id: I2e554a2ad0119b5f9ce2d36e4720538af5ef6b82
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>