Added default impls for container methods

A couple of implementations of Container::is_empty weren't exactly
self.len() == 0 so I left them alone (e.g. Treemap).
librustc: Stop trying to make invalid slice with vec in static.
Add test for #5917.
auto merge of #8036 : sfackler/rust/container-impls, r=msullivan

A couple of implementations of Container::is_empty weren't exactly
self.len() == 0 so I left them alone (e.g. Treemap).
auto merge of #8078 : luqmana/rust/gst, r=Aatch

Fixes #5917 by not trying to treat `&[T]` as a slice since it already is one.