Fix potential discarding of job status updates for gt2 jobs
Fix potential discarding of job status updates for gt2 jobs

If a job status update of DONE (which is turned into STAGE_OUT) arrives
from the grid monitor while the gridmanager is trying to restart the
jobmanager, the update can be lost. Once the restart completes and the
GlobusJob moves to GM_SUBMITTED state, it decides whether to put the
jobmanager back to sleep before checking if there are any unconsumed job
status callbacks. Then, when the gridmanager tells the jobmanager to
exit, the jobmanager replies with a new callback saying it's going away,
which overwrites the previous callback of DONE.

Now, we check for pending callbacks in GM_SUBMITTED before deciding
whether the jobmanager should be put to sleep.

mambelli/osg-bosco-marco,djw8605/htcondor,mambelli/osg-bosco-marco,zhangzhehust/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,htcondor/htcondor,djw8605/htcondor,djw8605/condor,htcondor/htcondor,neurodebian/htcondor,djw8605/condor,zhangzhehust/htcondor,neurodebian/htcondor,htcondor/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,djw8605/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,htcondor/htcondor,bbockelm/condor-network-accounting,djw8605/condor,djw8605/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,neurodebian/htcondor,djw8605/htcondor,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,djw8605/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,htcondor/htcondor,mambelli/osg-bosco-marco,djw8605/condor,djw8605/condor,bbockelm/condor-network-accounting,clalancette/condor-dcloud,djw8605/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,htcondor/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud,zhangzhehust/htcondor,neurodebian/htcondor,djw8605/condor,bbockelm/condor-network-accounting,djw8605/condor,djw8605/condor,htcondor/htcondor,djw8605/htcondor,bbockelm/condor-network-accounting,htcondor/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,zhangzhehust/htcondor,zhangzhehust/htcondor,zhangzhehust/htcondor