Make WaitForJobChanges deal with long jobs
This patch alters the WaitForJobChanges luxi-RPC call to have a
configurable timeout, so that the call behaves nicely with long jobs
that have no update.
We do this by adding a timeout parameter in the RPC call, and returning
a special constant when the timeout is reached without an update. The
luxi client will repeatedly call the WaitForJobChanges until it gets a
real change. The timeout is hardcoded as half the RWTO value.
The patch also removes an unused variable (new_state) from the
WaitForJobChanges method.
Reviewed-by: imsnah,ultrotter