usb_dev: Better document how to connect the driver to firmware

While the existing documentation was acceptable, it did not explain how to
connect the control request handler to firmware, leaving it as an exercise
to the reader. Add this missing documentation.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_dev: Be explicit no data is returned during a IN transactions

Be explicit when data is not returned in a control transaction. Some
stacks, including the libopencm3 stack may get confused when the 'len'
parameter of qiprog_handle_control_request() is not zeroed.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
usb_dev: Hook qiprog_set_address to USB control requests

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
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: Fix compiler warnings

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