kingst-la2016: move USB bulk transfer handling to helper routines
Concentrate all support code which handles USB bulk transfers for the
capture data download in a set of helper routines: memory allocation
and release, submission and cancellation including re-submission after
a previous completion.
Submit host side transfers earlier, between the configuration and the
start of USB bulk transfers in the device. Allocate transfers and their
buffers at the first acquisition start. Keep allocated buffers across
several acquisition periods. Relase transfers and their buffers when the
device closes. Allocate buffers of fixed size (always 256KiB, no longer
depends on the remainder of the currently downloaded capture data).
Acquisition stop cancels all currently submitted transfers, and does
postprocess their (cancelled) completion without re-submitting. This
avoids "spilling" pending transfers into the next acquisition cycle.
Name the helper routines in preparation of using multiple transfers.
Stick with a single transfer in this commit to simplify review. Use a
longer USB receive timeout (500ms for capture data, in contrast to
200ms for control transfers).