smallint{map,set}: replace iterators with DoubleEndedIterator

Also changed the tests to iterate over sparse maps/sets.
Add tests for issues which can be closed

Closes #5275, $4547
str: Implement Container for ~str, @str and Mutable for ~str

~str and @str need separate implementations for use in generic
functions, where it will not automatically use the impl on &str.
rm obsolete no-op lints
syntax: print visibilities of foreign items
Doc for ast::Path
Add slice_from and slice_to methods for vec, like the
methods of the same names that already exist for strs.
Avoid creating llenv blocks when there's nothing to load

Currently, all closures have an llenv block to load values from the
captured environment, but for closure that don't actually capture
anything, that block is useless and can be skipped.
Remove an unnecessary block/jump from the drop glue for @-pointer

The nested with_cond calls each introduce a "next" block, with the
inner one just jumping to the outer one.
Provide lower level access to the LLVM IR builder

Currently, the helper functions in the "build" module can only append
at the end of a block. For certain things we'll want to be able to
insert code at arbitrary locations inside a block though. Although can
we do that by directly calling the LLVM functions, that is rather ugly
and means that somethings need to be implemented twice. Once in terms
of the helper functions and once in terms of low level LLVM functions.

Instead of doing that, we should provide a Builder type that provides
low level access to the builder, and which can be used by both, the
helper functions in the "build" module, as well larger units of
abstractions that combine several LLVM instructions.
Avoid blocks for static allocas and loading the closure environment

These blocks were required because previously we could only insert
instructions at the end of blocks, but we wanted to have all allocas in
one place, so they can be collapse. But now we have "direct" access the
the LLVM IR builder and can position it freely. This allows us to use
the same trick that clang uses, which means that we insert a dummy
"marker" instruction to identify the spot at which we want to insert
allocas. We can then later position the IR builder at that spot and
insert the alloca instruction, without any dedicated block.

The block for loading the closure environment can now also go away,
because the function context now provides the toplevel block, and the
translation of the loading happens first, so that's good enough.

Makes the LLVM IR a bit more readable, saving a bunch of branches in the
unoptimized code, which benefits unoptimized builds.
Remove what appears to be redundant indirection from
os::list_dir_path.
auto merge of #7921 : bytewiseand/rust/smallint-iter, r=huonw

Made the `iter` and `mut_iter` methods on SmallIntMap and SmallIntSet return double-ended-iterators. These iterators now implement `size_hint`.

Also the iterator tests only tested dense maps/sets, which aren't very useful. So they were changed to iterate over sparse maps/sets.

Fixes #7721
auto merge of #7923 : alexcrichton/rust/add-tests, r=graydon

Closes #5275, #4547
auto merge of #7932 : blake2-ppc/rust/str-clear, r=huonw

~str and @str need separate implementations for use in generic
functions, where it will not automatically use the impl on &str.

fixes issue #7900
syntax: Bless mod.rs. #4116

When loading a module the parser will look for either foo.rs or foo/mod.rs and generate
an error when both are found.
Merge pull request #7936 from thestinger/cleanup

rm obsolete no-op lints
auto merge of #7938 : crabtw/rust/foreign-vis, r=huonw
new snapshot
temporarily disable 3 rustpkg tests

Re-enabling these when the ephemeral failures are fixed is filed as
issue #7956.