Make std::io::Buffer object-safe.

[breaking-change]
Any uses of Buffer::lines() and Buffer::chars() will need to use the new trait std::io::BufferPrelude.
auto merge of #18788 : ricky26/rust/master, r=aturon

This moves chars() and lines() out of Buffer and into separate traits (CharsBuffer and LinesBuffer respectively) - this matches the pattern used for bytes() on Reader (with BytesReader).

(I came across this when I wanted a trait object of a Buffer, so that I could use read_line(); rustc errors about std::io::Buffer not being object-safe.)

[breaking-change]
Any uses of Buffer::lines() will need to use the new trait std::io::LinesBuffer.
The same is true for Buffer::chars() with std::io::CharsBuffer.
Remove Runtime trait and bookkeeping module

This commit removes most of the remaining runtime infrastructure related
to the green/native split. In particular, it removes the `Runtime` trait
and instead inlines the native implementation.

It also changes the semantics of Rust programs so that they exit when
the main thread terminates, rather than implicitly joining on all
running tasks.

Closes #17325

[breaking-change]
Remove libnative

With runtime removal complete, there's nothing left of libnative. This
commit removes it.

Fixes #18687

[breaking-change]
Remove libgreen

With runtime removal complete, there is no longer any reason to provide
libgreen.

[breaking-change]
Rewrite sync::mutex as thin layer over native mutexes

Previously, sync::mutex had to split between green and native runtime
systems and thus could not simply use the native mutex facility.

This commit rewrites sync::mutex to link directly to native mutexes; in
the future, the two will probably be coalesced into a single
module (once librustrt is pulled into libstd wholesale).
Fallout from libgreen and libnative removal
Make most of std::rt private

Previously, the entire runtime API surface was publicly exposed, but
that is neither necessary nor desirable. This commit hides most of the
module, using librustrt directly as needed. The arrangement will need to
be revisited when rustrt is pulled into std.

[breaking-change]
Fallout from new termination semantics