Fix state transition when OFFLINING a device
Fix state transition when OFFLINING a device

When canceling or ending a TestJob, if the corresponding device status is
OFFLINING, then it should transition to OFFLINE.

Without this patch, it's possible to:
* run a job
* while the job is running, set the device status to OFFLINING
* cancel the job

The Device status is now IDLE instead of OFFLINE.

Change-Id: I9267f3c648dbe5566dd349d8c4cfdef71ee3fc37

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