HPCC-9221 Deleting package from roxie will cause query to hang

This is a regression caused by recent changes to package reload code, and does
not affect any released version.

This change will fix the deadlock - I also revisitde the question of
whether the critsec that causes the deadlock is really required, but
I think without some major refactoring, it probably is.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Merge pull request #4329 from richardkchapman/roxie_package_lockup

HPCC-9221 Deleting package from roxie will cause query to hang

Reviewed-by: Gavin Halliday <ghalliday@hpccsystems.com>