threading: Limit the progress bitfields to the used size
Store the used size instead of the allocated size.
The used size can be smaller than the allocated size, which results in a wrong computation of the linear progress from the frame_progress bitfield.
Closes #404.
Edited by Victorien Le Couviour--Tuffet