Don't fail in TcpStream.flush
extra: use a mutex to wrap linenoise calls and make them threadsafe.

Fixes #3921.
extra: stop rl from leaking each line that is read.
extra: improvements & bug fixes to rl.

- Removes a layer of indirection in the storage of the completion
  callback.
- Handles user tab completion in a task in which `complete` hasn't been
  properly. Previously, if `complete` was called in one task, and `read`
  called in another, attempting to get completions would crash. This
  makes the completion handlers non-ambiguously task-local only.
- Fix a mismatch in return values between the Rust code and linenoise.
Add a test for extra::rl.

This test has to be run by a human, to check inputs etc. Fortunately, it
won't bitrot (syntactically, or type-check-ly; it might bitrot
semantically), as it is designed so that the test runner compiles it with
`--cfg robot_mode`, which is used to disable the actual running of code.
Add HashSet::with_capacity_and_keys() function

This function can be use to create HashSets before the tls is
initialized.
Support character range patterns (e.g. [0-9], [a-z]), like other globs do.
Rendezvous stream for synchronous channel messaging
librust: Remove unnecessary workaround. Closes #7617
more helpful error message for ident comparison failure
fix for bug #9110
ident->name cleanup
added run-pass test from issue #9110
implement raw pointer comparisons in librustc

This is mostly for consistency, as you can now compare raw pointers in
constant expressions or without the standard library.

It also reduces the number of `ptrtoint` instructions in the IR, making
tracking down culprits of what's usually an anti-pattern easier.
auto merge of #9114 : sfackler/rust/flush-fix, r=brson
Flag the dynamic_lib tests as ignored

The library isn't thread-safe, cc #9137
Add linenoise lock helpers to rustrt.def.in.
Implement a format_args!() macro

The purpose of this macro is to further reduce the number of allocations which
occur when dealing with formatting strings. This macro will perform all of the
static analysis necessary to validate that a format string is safe, and then it
will wrap up the "format string" into an opaque struct which can then be passed
around.

Two safe functions are added (write/format) which take this opaque argument
structure, unwrap it, and then call the unsafe version of write/format (in an
unsafe block). Other than these two functions, it is not intended for anyone to
ever look inside this opaque struct.

The macro looks a bit odd, but mostly because of rvalue lifetimes this is the
only way for it to be safe that I know of.

Example use-cases of this are:

* third-party libraries can use the default formatting syntax without any
  forced allocations
* the fail!() macro can avoid allocating the format string
* the logging macros can avoid allocation any strings
Parse underscores in identifiers for format!

Closes #9119
auto merge of #9138 : alexcrichton/rust/dynamic-lib-not-threadsafe, r=thestinger

The library isn't thread-safe, cc #9137