env: Create fast accessors for the frame.

Signed-off-by: Corbin Simpson <cds@corbinsimpson.com> <simpsoco@google.com>
scope: Consolidate scope analysis code.

The shadow scope technique remains, but now it is consolidated into a single
class which holds both scope stacks. In addition, scoping now assigns an index
to every seen name in the scope.

This is in preparation for switching over to fully indexed frames.

Signed-off-by: Corbin Simpson <cds@corbinsimpson.com> <simpsoco@google.com>
Access frames exclusively by index.

This is a still-fragile but very promising permanent structural improvement to
scope and environment handling.

Signed-off-by: Corbin Simpson <cds@corbinsimpson.com> <simpsoco@google.com>