libqiprog: Store context pointer in each device struct

Some drivers may need to have access to the qiprog context. For example,
the USB host driver needs the libusb context pointer (stored in the qiprog
context) for asynchronous USB transactions. Store a pointer to the qiprog
context in each device struct.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Add macros for MIN and MAX

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_dev: Declare ctrl buffer inside qiprog_handle_control_request

The control buffer should not be visible outside of
qiprog_handle_control_request.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_dev: Add preliminary infrastructure for bulk-reading chip

This is the minimum infrastructure needed to handle bulk reading of the
flash chip in firmware. On the VultureProg test hadware, it achieves bulk
reading with insignificant deadtime on the LPC bus.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>