This implements Hal's idea suggested in D30725.
If `--enable-var-scope` is in effect, variables with names that
start with $ are considered to be global. All others variables are
local. All local variables get undefined at the beginning of each
CHECK-LABEL block. Global variables are not affected by CHECK-LABEL.
This makes it easier to ensure that individual tests are not affected
by variables set in preceding tests.
The feature is not enabled by default as there are few hundred tests that depend on variables remaining set across CHECK-LABEL.
Once tests are cleaned up we can flip the flag to be enabled by default.
Nit, "blocks" aren't really a concept in FileCheck. Maybe we should just say "If `--enable-var-scope` is in effect, all local variables (i.e. variables that don't start with "$") are cleared when a CHECK-LABEL is encountered."