rt/core: impl os::getcwd() in rust ref #4812
core: add ptr::array_each and ptr::array_with_len_each
core: add win32 API for getting environ string
core: fix broken ptr:array_each impl + more robust tests.
rt/core: impl os::env() in rust, except C glue to get environ on *nix

- keeping the environ fetching stuff in place.. rust_get_env_pairs is
a stub on windows for the sake of build pain easing, otherwise the
*nix version just returns the environ ptr
core: get all-rust os::env() building on win32
core: strip unneeded integer suffixes
core: safety checks for ptr::array_each & os::env + meaningul fail msgs
core: vec::len/each -> foo.len/each for ptr/os code i touched
rt/core: port os::list_dir to rust in unix
core: ignoring should_fail tests on windows
core: add private::exchange_alloc::{malloc_raw,free_raw}

thin wrappers around libc::{malloc,free}, respectively. If/when box headers
go away (and the requirement in exchange_alloc::malloc for a *TypeDesc),
malloc/free and malloc_raw/free_raw can be merged.
core: add libc::wcslen()
core: more work on win32 libc:: bindings for os::list_dir
rt: a few helper functions to facilitate os::list_dir on win32
core: complete porting os::list_dir to rust on win32
rt: dead code cleanup.. no more make_str/make_str_vec

.. that many less calls to kernel->malloc! hooray!
test/build: cleanup to pass make check
auto merge of #5013 : olsonjeffery/rust/4812_work, r=brson

Happy Presidents' Day!

Four things:

- added `ptr::array_each()` to `core`, used to iterate over the elements in a `**T`. `ptr::array_each` assumes the provided array is null-terminated and determins length via `ptr::buf_len`. There is a `ptr:array_each_with_len` that takes a length parameter
- ported `os::get_cwd()` to rust, calling into C library fns in `core::libc`
- ported `os::env()` to rust. The win32 version uses API available in `libc::funcs::extra::kernel32`, while the *nix versions still use the `rust_env_pairs` in rt, which now just return the `**environ` (in platform applicable fashion).
- porting os::list_dir() to rust (unix is complete, windows complete)

The latter three are towards finishing #4812 .

core tests are passing in linux and OSX. I have an issue with my windows vm where rustc chews up and keeps hitting the 32bit process memory limit before segfaulting on one of the stage1 library builds. But I know that libcore builds on win32.