Separate allow_gc flag for scan

This add a separately configurable flag to enable/disable allow_gc
I do not see any affectation to self.allow_gc anymore. Now it is always in the info dict. There is a few other case where self.allow_gc is used.