Some cleanup in std::io::buffered

`Vec` is now used for the internal buffer instead of `~[]`. Some module
level documentation somehow ended up attached to `BufferedReader` so I
fixed that as well.
Change types T,U to R (recv), S (sender) in libsync/comm.rs
make std::managed private

This removes two tests built on `managed::refcount`, but these issues
are well-covered elsewhere for non-managed types.
auto merge of #13089 : thestinger/rust/managed, r=Aatch

This removes two tests built on `managed::refcount`, but these issues
are well-covered elsewhere for non-managed types.
use TotalEq for HashMap

Closes #5283
auto merge of #13088 : thestinger/rust/hashmap, r=cmr

Closes #5283
iter: remove `to_owned_vec`

This needs to be removed as part of removing `~[T]`. Partial type hints
are now allowed, and will remove the need to add a version of this
method for `Vec<T>`. For now, this involves a few workarounds for
partial type hints not completely working.
auto merge of #13090 : thestinger/rust/iter, r=Aatch

This has been rendered obsolete by partial type hints. Since the `~[T]`
type is in the process of being removed, it needs to go away.
Register new snapshots
auto merge of #13092 : sfackler/rust/buffer-vec, r=thestinger

`Vec` is now used for the internal buffer instead of `~[]`. Some module
level documentation somehow ended up attached to `BufferedReader` so I
fixed that as well.
auto merge of #13093 : Havvy/rust/master, r=sfackler

This will make the types more readable in the documentation, since the letters correspond with what you should either be sending or expecting to receive.
auto merge of #13099 : FlaPer87/rust/master, r=huonw
Snapshot cleanup
std: Move NativeMutex from &mut self to &self

The proper usage of shared types is now sharing through `&self` rather than
`&mut self` because the mutable version will provide stronger guarantees (no
aliasing on *any* thread).
sync: Move the concurrent queue to using &self

This commit also lifts it up a level in the module hierarchy in the soon-to-come
reorganization of libsync.
sync: Move the Mutex type to using &self

This also uses the Unsafe type for any interior mutability in the type to avoid
transmutes.
sync: Move Once to using &self

Similarly to the rest of the previous commits, this moves the once primitive to
using &self instead of &mut self for proper sharing among many threads now.
sync: Rewrite the base primitives

This commit rewrites the core primitives of the sync library: Mutex, RWLock, and
Semaphore. These primitives now have updated, more modernized apis:

* Guards are returned instead of locking with closures. All condition variables
  have moved inside the guards and extraneous methods have been removed.
* Downgrading on an rwlock is now done through the guard instead of the rwlock
  itself.

These types are meant to be general locks, not locks of an internal type (for
external usage). New types will be introduced for locking shared data.
sync: Introduce new wrapper types for locking

This introduces new synchronization types which are meant to be the foundational
building blocks for sharing data among tasks. The new Mutex and RWLock types
have a type parameter which is the internal data that is accessed. Access to the
data is all performed through the guards returned, and the guards all have
autoderef implemented for easy access.
sync: Update the arc module

This removes the now-outdated MutexArc and RWArc types. These are superseded by
Arc<Mutex<T>> and Arc<RWLock<T>>. The only remaining arc is the one true Arc.
Additionally, the arc now has weak pointers implemented for it to assist in
breaking cycles.

This commit brings the arc api up to parity with the sibling Rc api, making them
nearly interchangeable for inter and intra task communication.