Run DROPDB when server is not running

This fix covers 90% (20 out of 22) deadlocks have been seen in test logs.
One case was caused by 'dropdb' in cli tests themselves.
We should get rid of 'dropdb' in cli tests to avoid these deadlocks.
One another case doesn't seem to be connected with this issue.
test_task_managers.test_deletion_during_deployment test refactored.

Closes-Bug: #1317432

Change-Id: Id11785103db392d41b0d0c35223fe4476ac8e85f