std: Fail more gracefully on thread spawn errors

On windows, correctly check for errors when spawning threads, and on both
windows and unix handle the error more gracefully rather than printing an opaque
assertion failure.

Closes #13589
Fix smallest-hello-world.rs interaction with `puts`

It now hands `puts` a zero-terminated string, like it expects.

Fix #13603.
vim: Add StrBuf as type to hilighting
Reduce HashMap allocations.
std: Fix demangling with middle special chars

Previously, symbols with rust escape sequences (denoted with dollar signs)
weren't demangled if the escape sequence showed up in the middle. This alters
the printing loop to look through the entire string for dollar characters.
auto merge of #13606 : alexcrichton/rust/better-thread-errors, r=brson

On windows, correctly check for errors when spawning threads, and on both
windows and unix handle the error more gracefully rather than printing an opaque
assertion failure.

Closes #13589
auto merge of #13608 : tbu-/rust/pr_smallesthello, r=alexcrichton

It now hands `puts` a zero-terminated string, like it expects.

Fix #13603.
std: Add an experimental connect_timeout function

This adds a `TcpStream::connect_timeout` function in order to assist opening
connections with a timeout (cc #13523). There isn't really much design space for
this specific operation (unlike timing out normal blocking reads/writes), so I
am fairly confident that this is the correct interface for this function.

The function is marked #[experimental] because it takes a u64 timeout argument,
and the u64 type is likely to change in the future.
auto merge of #13604 : alexcrichton/rust/connect-timeout, r=brson

This adds a `TcpStream::connect_timeout` function in order to assist opening
connections with a timeout (cc #13523). There isn't really much design space for
this specific operation (unlike timing out normal blocking reads/writes), so I
am fairly confident that this is the correct interface for this function.

The function is marked #[experimental] because it takes a u64 timeout argument,
and the u64 type is likely to change in the future.
auto merge of #13609 : richo/rust/str-type-vim, r=alexcrichton

It seems really weird to me when StrSlice and str highlight sanely, but StrBuf doesn't.

I think I added it to the right place.
auto merge of #13614 : cgaebel/rust/master, r=brson

We previously allocated 3x for every HashMap creation and resize. This patch reduces it to 1x.
auto merge of #13615 : alexcrichton/rust/improve-demangling, r=brson

Previously, symbols with rust escape sequences (denoted with dollar signs)
weren't demangled if the escape sequence showed up in the middle. This alters
the printing loop to look through the entire string for dollar characters.