syntax: make OptVec immutable.

This is the first step to replacing OptVec with a new representation:
remove all mutability. Any mutations have to go via `Vec` and then make
to `OptVec`.

Many of the uses of OptVec are unnecessary now that Vec has no-alloc
emptiness (and have been converted to Vec): the only ones that really
need it are the AST and sty's (and so on) where there are a *lot* of
instances of them, and they're (mostly) immutable.
Added new attribute syntax with backward compatibility.

Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
syntax: Tidy up parsing the new attribute syntax
std: Rename {push,read}_bytes to {push,read}_exact

These methods can be mistaken for general "read some bytes" utilities when
they're actually only meant for reading an exact number of bytes. By renaming
them it's much clearer about what they're doing without having to read the
documentation.

Closes #12892
Remove RefCell::{with, with_mut}

These are superfluous now that we have fixed rvalue lifetimes and Deref.
std: Implement Clone/TotalEq for ProcessExit

It's useful for structures which use deriving(Clone, TotalEq), even though it's
implicitly copyable.

Closes #13047
Clean up marker types and Unsafe initialization
auto merge of #13037 : alexcrichton/rust/attr-syntax, r=brson

This will require a snapshot to finish, but these commits update the parser to parse attributes of the form `#![...]`

Thanks to @TheHydroImpulse for all the initial work!

cc #2569
auto merge of #13029 : FlaPer87/rust/master, r=alexcrichton

This should prevent lot of doc errors in Rust's buildbot and it shouldn't take long to run on travis. We could probably limit it to `std` but I preferred to just check all docs in this phase too.

@alexcrichton r?
libstd: Add some methods to `Vec<T>`.
test: Automatically remove all `~[T]` from tests.
test: Make manual changes to deal with the fallout from removal of
`~[T]` in test, libgetopts, compiletest, librustdoc, and libnum.
Rewrite rc::Rc using cell::Cell

Since `Arc` has been using `Atomic`, this closes 12625.

Closes #12625.
auto merge of #12654 : edwardw/rust/rc-arc, r=huonw

Since `Arc` has been using `Atomic`, this closes 12625.

Closes #12625.
Remove outdated and unnecessary std::vec_ng::Vec imports.

(And fix some tests.)
Remove nearly all uses of `~[]` from libtest.

Deny further uses, with explicit allows on a few specific functions.
getopts: remove all uses of `~[]`.

And stop regressions with the lint.
Add #[deny(deprecated_owned_vector)] to several modules.
syntax: allow `trace_macros!` and `log_syntax!` in item position.

Previously

    trace_macros!(true)
    fn main() {}

would complain about `trace_macros` being an expression macro in item
position. This is a pointless limitation, because the macro is purely
compile-time, with no runtime effect. (And similarly for log_syntax.)

This also changes the behaviour of `trace_macros!` very slightly, it
used to be equivalent to

    macro_rules! trace_macros {
        (true $($_x: tt)*) => { true };
        (false $($_x: tt)*) => { false }
    }

I.e. you could invoke it with arbitrary trailing arguments, which were
ignored. It is changed to accept only exactly `true` or `false` (with no
trailing arguments) and expands to `()`.
syntax: add the OwnedSlice vector wrapper.

This is a stand-in until we have a saner `~[T]` type (i.e. a proper
owned slice). It's a library version of what `~[T]` will be, i.e. an
owned pointer and a length.