Add onsync api call to sync module, add docs

Also reworked onsync to pass the actual list of modules, and not the
oddly formatted tuple of {FirstModule, RestOfModules}, which only makes
sense within the context of sync_scanner.