Add support for arbitrary flags to MemoryMap.

This also fixes up the documentation a bit, it was subtly incorrect.
Use `mmap` to map in task stacks and guard page

Also implement caching of stacks.
Update task-perf-one-million
Add benchmarks
Fix zero-sized memory mapping
Bring in the line-length police
auto merge of #11762 : alexcrichton/rust/guard_pages, r=alexcrichton

Rebasing of the previous PRs, I believe I've found the problems.
Demote self to an (almost) regular argument and remove the env param.
Fixes #10667 and closes #10259.