HPCC-9443 Race condition can cause roxie to core when updating packages

If a control:reload and an automatic notify from Dali coincide, a race
condition can cause Roxie to core. The retrieval and linking of the old
packages needs to be inside the WriteLockBlock.

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>