std: Be sure to call pthread_attr_destroy

On some OSes (such as freebsd), pthread_attr_init allocates memory, so this is
necessary to deallocate that memory.

Closes #13420
auto merge of #13457 : alexcrichton/rust/issue-13420, r=thestinger

On some OSes (such as freebsd), pthread_attr_init allocates memory, so this is
necessary to deallocate that memory.

Closes #13420