Add callback param to collect()

This patch does 2 things:
1. make `collect` show progress on demand only (so not to break logs when rgc is used as lib);
2. make `collect` call a callback instead of simply deleting the objects; the default cb is to delete;
3. refactor some tests.