Add macro for checking NULL parameters in a driver

The core of libqiprog consists of action(device *dev), where we dereference
the driver in dev, and call its drv->action. dev and dev-drv cannot be
NULL. To not boilerplate this check in every core function, use a macro to
do the checking.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Move core functionality to a separate file

We need the ultra-light QiProg core to be separate from the library
initialization and device detection. This allows us to reuse the core in
QiProg devices as well.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
libqiprog: Remove unused 'init' member in drivers

A driver should not need to initialize itself in order to perform its
duties. A device's initialization should be handled in .dev_open, if needed
We can bring .init back later if it makes sense, but for now, take it out.

Signed-off-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
doc: "Pretty-ize" protocol description in markdown format

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