Plugin scanning: added a custom scanner callback, and added an option to run the scan on a background thread.