libsyntax: fix infinite loop when recursively including modules

Fixes #7276
auto merge of #7585 : Blei/rust/fix-circular-modules, r=huonw

Fixes #7276
Stop allocating view_items with @
De-managed ast::Path
De-manage Lifetime
De-share trait_ref

Also, makes the pretty-printer use & instead of @ as much as possible,
which will help with later changes, though in the interim has produced
some... interesting constructs.
De-manage OptVec<TyParamBounds>
De-share ast::Ty
Clean up warnings
Fix rustdoc and rusti
Fix broken tests
Add trait-based AST visitor
Rewrite two of the visitors

Rewrites two of the visitors, the id_visitor and the ast_map visitor.
I also re-wrote the AST map to use borrowed pointers into the AST,
which means that it makes no copies of AST items.

This only changes libsyntax.
Work-In-Progress Commit

Fixes almost all the resolve errors from the libsyntax changes.
Requires a new snapshot, temporarily using aborted snapshot to
work on this.

Change entry-point finder to use new visitor
Add lifetime annotations everywhere needed