Add support for registering a scan listener.

The user may now pass an instance of ScanListener to the
SaneDevice.acquireImage method. This instance will be notified when various
scan events occur.