scheduler: changing the final state when deployment interval expiring

All commands not having current_state 'done' was switched on 'over_timed'
when deployment interval has expired.
This correction change the behavior of workflow on the moment of expiration.
A command having any curent_state '*_failed' will be switched on 'failed'.