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
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