Add tests and un-xfail a few issues

Closes #4545
Closes #5791
Closes #6470
Closes #8044
extra::tempfile: replace mkdtemp with an RAII wrapper

this incidentally stops `make check` from leaving directories in `/tmp`
De-pub some private runtime components

This change was waiting for privacy to get sorted out, which should be true now
that #8215 has landed.

Closes #4427
correct names for `#[no_send]`/`#[no_freeze]` tests
clean up the `Rc`/`RcMut` types and move to libstd
Remove support for older CrateMap versions
rustpkg: Set exit codes properly and make tests take advantage of that

When I started writing the rustpkg tests, task failure didn't set the
exit code properly. But bblum's work from July fixed that. Hooray! I
just didn't know about it till now.

So, now rustpkg uses exit codes in a more conventional way, and some of
the tests are simpler.

The bigger issue will be to make task failure propagate the error message.
Right now, rustpkg does most of the work in separate tasks, which means if
a task fails, rustpkg can't distinguish between different types of failure
(see #3408)
rc: rename borrow to get

Shorter and same name used by Arc
rc, arc: add copy-on-write mutable borrowing to Rc and Arc
rc, arc: add support for by-value copy-on-write and try-to-write

The try_ functions don't require Clone, but they do nothing if rc > 1

The try_unwrap and value take and return by-value instead of &mut
arc: relax kind bounds on non-constructor

They aren't needed, since arcs without the kinds can't be created
with safe code, and unsafe code should be allowed to do whatever it
wants.

This greatly simplifies libraries using Arc<T> who no longer need
to impose those traits unless they construct arcs.
own: add owned pointer wrapper with API like Rc and Arc
treemap: replace with a potentially snapshottable version