add a note on the license
implement preliminary support for scopes

This also adds support for per-build variables, includes, and subninjas;
it's a pretty big rewrite. Needs lots more tests added.