syntax: move functions from deriving/mod to deriving/generic.

These are now only called in generic and can be private. This
includes manually inlining/merging some that are called once.
syntax: move expand_generic_deriving to be a method on TraitDef
rustc::metadata::decoder: cleanup and slightly speed up each_path
auto merge of #6946 : Blei/rust/fix-each-path, r=Aatch
syntax: rewrite deriving(Ord) to not require Eq.

lt and gt are implement directly in terms of the corresponding
method on their elements, and le and ge are the negations of these.
syntax: correct the modifications to deriving(Ord) so that it works.
auto merge of #6988 : huonw/rust/deriving-changes, r=bstrie

Several minor changes:
 - The clean-up I mentioned in #6851 (moving functions from deriving/mod.rs to deriving/generic.rs)
 - Move `expand_generic_deriving` to a method
 - Reimplement `deriving(Ord)` with no dependence on `Eq`
std: more dummy type parameters on iterators to work around #6967.
std: remove vec::each2 and vec::each2_mut in favour of iterators
rustc: Convert a fail! to a useful error message.
auto merge of #6990 : huonw/rust/const-eval, r=bstrie

This fail! caused ICEs, but was trivial to convert to a useful error message.
std: remove each[i]_mut functions, in favour of iterators.
Merge branch 'each-fn-kill' of https://github.com/huonw/rust into each-fn-kill
iterator: work around method resolve bug (#5898)
auto merge of #6999 : thestinger/rust/each-fn-kill, r=thestinger
Lexer: Fix offset handling in get_str_from()

As the comment said, the subtraction is bogus for multibyte characters.
Fortunately, we can just use last_pos instead of pos to get the correct
position without any subtraction hackery.
Avoid unnecessary (re-)allocations in the lexer
Avoid unnecessary heap allocations in the metadata ty decoder
tydecode: Accept a plain borrowed pointer to the data
Lexer: Avoid unnecessary allocations