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
TypeChecker: Avoid unnecessary copies
Remove some unnecessary closures
Avoid unnecessary allocations in the metadata decoder
rm some uses of to_mut_unsafe_ptr
auto merge of #7004 : dotdash/rust/allocs, r=thestinger

This removes some unnecessary allocations in the lexer, the typechecker and the metadata decoder. Reduces the time spent in the parsing and typechecking passes by about 10% for me.
auto merge of #7016 : thestinger/rust/ptr, r=luqmana
fix decoding of multiple attributes (fixes #7017)

We were just looking at the last because we were overwriting ret.
add test for RcMut being Const and Owned, tests #7017 being fixed
auto merge of #7018 : bill-myers/rust/fix_7017, r=thestinger

Minimally fixes #7017, we were overwriting the result and thus ignoring attributes before the last.

csearch::get_item_attrs and decoder::get_item_attrs should probably also be changed to each_item_attrs using the for protocol, but that's just a minor performance/style issue.
remove deprecated vec::{is_empty, len} functions
auto merge of #7023 : thestinger/rust/vec, r=brson
librustc: Can mark functions as deprecated.