Fix a spuriously tripped assert in select()

The race here happened when a port had its deschedule in select() canceled, but
the other chan had already been dropped. This meant that the DISCONNECTED case
was hit in abort_selection, but the to_wake cell hadn't been emptied yet (this
was done after aborting), causing an assert in abort_selection to trip.

To fix this, the to_wake cell is just emptied before abort_selection is called
(we know that we're the owner of it already).
Fix some docs about rt
Fixed iter's is_empty to use is_none() and added relevant test flag
Uppercase numeric constants

The following are renamed:

* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`

Fixes #10010.
auto merge of #11570 : derekchiang/rust/fix-rt-docs, r=alexcrichton
auto merge of #11775 : alexcrichton/rust/select-fix, r=pcwalton

The race here happened when a port had its deschedule in select() canceled, but
the other chan had already been dropped. This meant that the DISCONNECTED case
was hit in abort_selection, but the to_wake cell hadn't been emptied yet (this
was done after aborting), causing an assert in abort_selection to trip.

To fix this, the to_wake cell is just emptied before abort_selection is called
(we know that we're the owner of it already).
auto merge of #11788 : salemtalha/rust/master, r=huonw

Fixes #11785.
auto merge of #11790 : lfairy/rust/rename-num-consts, r=alexcrichton

The following are renamed:

* `min_value` => `MIN`
* `max_value` => `MAX`
* `bits` => `BITS`
* `bytes` => `BYTES`

All tests pass, except for `run-pass/phase-syntax-link-does-resolve.rs`. I doubt that failure is related, though.

Fixes #10010.
Fix spacing in example comment.
Implement barrier.
auto merge of #11795 : xales/rust/master, r=cmr
auto merge of #11725 : derekchiang/rust/add-barrier, r=alexcrichton