Fix #2366, fix #2358, correctly separate out numerical feature checking

We need separate concepts for
 - total set of extensions ever enabled, for the back end
 - current state of extensions, for parsing
 - the set of features currently enabled for building the AST
8 files changed