Fix deadlock on thread pool
This issue has been seen on a machine in TN Office ( realmini ), it seems randomly middlewared becomes totally unresponsive and locks itself out. The issue is resolved for the time being by restarting middlewared but the root cause should be investigated and patched.
This is already a high risk ticket and is causing total failure of middlewared.
"seq 1 25|while read i; do midclt call vm.get_available_memory &; done;"
should finish as expected and not lock up middlewared.