vec::with_capacity: do one alloc for non-managed + ptr module improvements

f74250e r=huonw

```rust
extern mod extra;

use std::vec;

#[bench]
fn bench_with_capacity(b: &mut extra::test::BenchHarness) {
    do b.iter {
        let _v: ~[u8] = vec::with_capacity(1024);
    }
}
```

Before:

`test bench_with_capacity ... bench: 293 ns/iter (+/- 0)`

After:

`test bench_with_capacity ... bench: 125 ns/iter (+/- 3)`