add API open_scan_pthread to support scanning with a separate scan resource per thread