syntax: remove dead @mut Visitor impl (only used in tests).

Also, move some code only uses in the tests into the test module, and
replace some needless @mut ~[] with plain ~[].