Revert "set job waiting if with interactive mode, and set it back to running when leaving interactive mode"

This reverts commit b38aca1c64311f07f6933893b6ce57d5e9e72f62.

Doesn't work. 'waiting' must only be set if os-autoinst is actually waiting for
input
handle jobs in waiting state
when grabbing job order by prio and id

so older jobs with same prio come first
don't use perldir for testcasedir
break lines for easier diff later
get rid of unused legacy functions
set CASEDIR in worker

This avoids os-autoinst autodetection based on it's script dir so we
can set the versioned dir as we need it