Expose "api" variable with simple logging API
Replace hacky "callback" system with error logger

Removes the inconsistency of having "callbacks" which are only used when
something goes wrong, while using return values on success.  Now there
are no callbacks and the errors are reported via the logger API.
Merge branch 'feature-logging-api' into dev