Fix bug #1257976 - scheduler deadlock.
Fix bug #1257976 - scheduler deadlock.

Check for devices which lost updation after job has been processed and fix
their status.

Change-Id: I3fc5aa0bdf020c42ac8dafe7a434724ca2372533
Reviewed-on: https://review.linaro.org/835
Reviewed-by: lava-bot <f1c518755f92a4c3b69132fe31fc3cc1dae5545f@linaro.org>
Reviewed-by: Neil Williams <7fa63296f36ddf15e756692583a73cae1716234f@linaro.org>

OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server,OSSystems/lava-server,OSSystems/lava-server,Linaro/lava-server,Linaro/lava-server