Treat builtin bounds like all other kinds of trait matches. Introduce a simple hashset in the fulfillment context to catch cases where we register the exact same obligation twice. This helps prevent duplicate error reports but also handles the recursive obligations created by builtin bounds.
Correct various compile-fail tests. Most of the changes are because we
now don't print duplicate errors within one context, so I sometimes
had to break functions into two functions.
FIXME(#19481) -- workaround valgrind cleanup failure (but the code is nicer this way anyhow)
auto merge of #18749 : nikomatsakis/rust/builtin-bounds-like-other-traits, r=pcwalton

Treat builtin bounds like all other kinds of trait matches. Introduce a simple hashset in the fulfillment context to catch cases where we register the exact same obligation twice. This helps prevent duplicate error reports but also handles the recursive obligations created by builtin bounds.

r? @pcwalton 
cc @FlaPer87
Rewrite threading infrastructure, introducing `Thunk` to represent
boxed `FnOnce` closures.
Purge the hack that allows `FnOnce` to be used with a by-value self method.  Besides being yucky, it will cause problems if we try to make all traits implement themselves, which would make a lot of things in life easier. Also, it was inextricably linked to `Box`, which was not the intention.  We can work around its absence, so better to reimplement it later in a more thorough fashion.
Adjust feature gates to allow for parenthetical notation to be used
with the fn traits
Remove `proc` types/expressions from the parser, compiler, and
language. Recommend `move||` instead.
Patch rustdoc to include missing types, make the match exhaustive
to prevent such oversights in the future.
Rewrite WorkItem not to use `proc()`.
Mostly rote conversion of `proc()` to `move||` (and occasionally `Thunk::new`)
Delete tests that are either no longer relevant or which have
duplicate tests around object types.
Update guide/intro to take into account the removal of `proc`.

cc @steveklabnick
Update emacs and vi modes.
Add some tests for obsolete code, sugar used in appropriate ways.
Temporarily remove issue #14039; it is fixed and re-added by PR #19438