Switch json parsing to read_chars for performance

Avoids the overhead of read_char for every character.

Benchmark reading example.json 10 times from
https://code.google.com/p/rapidjson/wiki/Performance

Before: 2.55s
After:  0.16s

Regression testing is already done by isrustfastyet.
str: stop encoding invalid out-of-range `char`
Faster check for ascii-space

Since ' ' is by far one of the most common characters, it is worthwhile
to put it first, and short-circuit the rest of the function.

On the same JSON benchmark, as the json_perf improvement, reading example.json
10 times from https://code.google.com/p/rapidjson/wiki/Performance.

Before: 0.16s
After: 0.11s
Merge branch 'unicode_perf' into json_perf
auto merge of #7608 : glinscott/rust/json_perf, r=pcwalton

Avoids the overhead of read_char for every character.

Benchmark reading example.json 10 times from
https://code.google.com/p/rapidjson/wiki/Performance

Before: 2.55s
After:  0.16s

Regression testing is already done by isrustfastyet.
auto merge of #7612 : thestinger/rust/utf8, r=huonw
Revert "De-share ast::Ty"

This reverts commit 47eca2113c5c55a4ffbb8c11a38c8ca7a79a1d72.
De-managed ast::Path
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
Changes the AST map builder to use a callback

This is for 2 reasons, 1. The map gets updated by the metadata
reader and any other way would require moving it out of the
owning structure. 2. Issue #4868 means that a borrow of the Map and
its lifetime collide, forcing the borrow to last for the lifetime of
the Map itself, not ideal.

There is some unsafe code introduced here to work around this problem
as it still comes up, but in a more managable form.
Work In Progress

Fixes a variety of lifetime errors in various places