make template variables 'const' not 'static'
protect against parameter shadowing and redeclaration
don't allow 'const' expressions as attribute bindings
add explanatory comment
general refactoring of the compiler hierarchy
return the scope tuple from a template instantiation

This update handles converting the local scope of a template
instantiation into a sortedmap. This map will be used later by bound
expression which close over the template scope. It also allows the
TemplateInstance to implement __getattr__, allowing consumers to access
the read-only template scope.