Fix calling destructor on uninitialized dynamic library crash.

A test case was also created for this situation to prevent the problem
occuring again.

A similar problem was also fixed for the symbol method.

There was some minor code cleanup.
std: Speed up str::is_utf8

Use unchecked vec indexing since the vector bounds are checked by the
loop. Iterators are not easy to use in this case since we skip 1-4 bytes
each lap. This part of the commit speeds up is_utf8 for ASCII input.

Check codepoint ranges by checking the byte ranges manually instead of
computing a full decoding for multibyte encodings. This is easy to read
and corresponds to the UTF-8 syntax in the RFC.

No changes to what we accept. A comment notes that surrogate halves are
accepted.

Before:

	test str::bench::is_utf8_100_ascii ... bench: 165 ns/iter (+/- 3)
	test str::bench::is_utf8_100_multibyte ... bench: 218 ns/iter (+/- 5)

After:
	test str::bench::is_utf8_100_ascii ... bench: 130 ns/iter (+/- 1)
	test str::bench::is_utf8_100_multibyte ... bench: 156 ns/iter (+/- 3)
Add trait name to conflicting implementation error message
Add backticks around trait name in conflicting implementations error message
Rename IpAddr -> SocketAddr, extract IpAddr from SocketAddr

multicast functions now take IpAddr (without port), because they dont't
need port.

Uv* types renamed:
* UvIpAddr -> UvSocketAddr
* UvIpv4 -> UvIpv4SocketAddr
* UvIpv6 -> UvIpv6SocketAddr

"Socket address" is a common name for (ip-address, port) pair (e.g. in
sockaddr_in struct).
Add default implementation of Map::contains_key function

Map::contains_key can be implemented with Map::find.

Remove several implementations of contains_key.
Revert "std::rt: Use a constant 4 threads for multithreaded sched tests"

This workaround was less than ideal. A better solution is to raise the
fd limit.

This reverts commit 49b72bdd77916e27aaf95909516702c1450f11ac.
Bump fd limit on macos when running rt tests

OS X defaults the ulimit for open files to 256 for programs launched
from the Terminal (GUI apps get a higher default). Unfortunately this is
too low for the rt tests, which deliberately overcommit and create a lot
of threads (which means a lot of schedulers, and each scheduler needs at
least 2 fds).

By calling sysctl() and setrlimit() we can bump the fd limit up to the
maximum allowed (on stock OS X it's 10240).

Fixes #7772.
Highlight sigils and operators in Vim.

Sigil highlighting isn't perfect (especially how it handles ``&``) but
after having used it for a week I feel it to be considerably nicer than
nothing. As usual, if you don't like it, you can turn it off easily by
overriding the default highlighting.

Generics are not handled specially; this means that for something like
``S<T>``, the ``<`` and ``>`` are highlighted as operators. For myself,
I like this, and there is no way to make it properly context aware
without expanding the syntax matching enormously.

Also, special characters are highlighted properly in strings/chars, e.g.
``"\x00"`` or ``'\Ufedcba98'`` appropriately.
Suppress a libuv leak on mac

I suspect that this is a race between process exit and the termination of
worker threads used by libuv (if I sleep before exit it doesn't leak). This
isn't going to cause any real problems but should probably be fixed at
some point.
Vim highlighting: remove `foreach` keyword
etc: add the `in` keyword to the emacs mode.
Fix building problems in extra::unicode.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
trans_arg_expr: Omit extra copies for rvalues

rvalues aren't going to be used anywhere but as the argument, so
there's no point in copying them. LLVM used to eliminate the copy
later, but why bother emitting it in the first place?
auto merge of #8213 : kballard/rust/fd-limit, r=brson

Revert the workaround 49b72bd and instead bump the fd limit on OS X.
auto merge of #8219 : sstewartgallus/rust/fix_dynamic_lib, r=graydon

A test case was also created for this situation to prevent the problem
occuring again.

A similar problem was also fixed for the symbol method.

There was some minor code cleanup.

I am unsatisfied with using /dev/null as an invalid dynamic library. It is not cross platform.
auto merge of #8223 : davidhalperin/rust/master, r=Aatch

Closes #7907

This is my first pull request so let me know if I've done anything wrong.  I tried to pick off a nice easy one.
auto merge of #8246 : stepancheg/rust/contains-key, r=thestinger

Map::contains_key can be implemented with Map::find.

Remove several implementations of contains_key.
std::rt: Run local storage cleanup and the box annihilator inside the try/catch

And before collect_failure. These are both running user dtors and need to be handled
in the task try/catch block and before the final task cleanup code.
Merge pull request #8251 from chris-morgan/vim-sigil-highlighting

Highlight sigils and operators in Vim.

r=huonw, known spurious failure on one bot