std: Use correct lifetime parameter on str::raw::slice_bytes

fn slice_bytes is marked unsafe since it allows violating the valid
string encoding property; but the function did also allow extending the
lifetime of the slice by mistake, since it's returning `&str`.

Use the annotation `slice_bytes<'a>(&'a str, ...) -> &'a str` so
that all uses of slice_bytes are region checked correctly.
Make node_id_to_str print more useful info in some cases. Closes #2410.
Fix an unused variable warning and clean up some dead code/names.
Warn when using -o option on libraries. Closes #6554.
Get rid of some NOTEs.
Improve debug spew in _match.
Use TreeMap's ord implementation for Json

Closes #4430
(cleanup) Uncomment an assertion that now holds.
Lazily initialize 'leaf node' taskgroups for unlinked spawns, for an apparent 11% speedup.
std: Add .consume_iter() for Option, to make it reusable

Let Option be a base for a widely useful one- or zero- item iterator.
Refactor OptionIterator to support any generic element type, so the same
iterator impl can be used for both &T, &mut T and T iterators.
std: Convert Result to use external iterators

convert iter() and iter_err() for Result. Use OptionIterator.
std: Remove unused trait bound in Result::map
std: Implement RandomAccessIterator for Invert
std: Improve vec::ChunkIter

Implement clone, bidirectionality and random access for this iterator
std: Add iterator::Repeat to repeat an element endlessly
std: Rewrite the HashSet set operation iterators

Use the Repeat iterator to carry the "explicit closure capture" that was
previously done with the custom EnvFilterIterator.
std: Use method name Option::consume

With Option as the simplest container, `consume` is the way to turn it
into a by-value iterator.
std: Improve the documentation for iterator::Invert
extra: Simplify the bitv iterators using Repeat
std: Remove uint::iterate, replaced by `range`