Reset the work_restart bool after the scanwork loop in case the driver flushes work synchronously.
Do the driver flush in avalon code lockless since it can lead to deadlocks.
Merge branch 'master' into allsync
Timeout is ignored with ftdi anyway so use same value for win and linux on avalon.