Clean up handling of var :test metadata

Instead of attaching to var AST simply put it on the def AST. Elide test code forms from analysis environment