Give the avalon get results thread name the device number as well.
Create a separate thread for handling all work and idle submission to the avalon which messages the scanhash function it has completed to update statistics.