Adding methods that returns errors when out of memory for collections

Since Vec exposes its implementation, I recommend putting these methods in a separate package on crates.io.

The only problem with this being that the allocation system is unstable, so you can't use Rust's allocator.