test: implement a no-alloc -> &str method for TestName.

This is far cheaper than the `.to_str` technique that was used previously.
test: allow the test filter to be a regex.

This is fully backwards compatible, since test names are Rust
identifiers + `:`, and hence not special regex characters.

Fixes #2866.
test: ensure that the extended usage description gets printed.

Previously the longer hand-written usage string was never being printed:
theoretically it was trying to detect when precisely `--help` was
passed (but not `-h`), but the getopts framework was considering a check
for the presence of `-h` to be a check for that of `--help` too,
i.e. the code was always going through the `-h` path.

This changes it to print the extended usage for both `-h` and `--help`,
meaning that it does actually appear correctly.
std:: switch the order in which dynamic_lib adds search paths.

The compiler needs to be opening e.g. libregex in the correct directory,
which requires getting these in the right order.
auto merge of #13948 : huonw/rust/test-regex-filter, r=alexcrichton

This allows writing a regex to filter tests more precisely, rather than having to list long paths e.g.

```
$ ./stdtest-x86_64-unknown-linux-gnu 'vec.*clone'

running 2 tests
test vec::tests::test_clone ... ok
test vec::tests::test_clone_from ... ok

test result: ok. 2 passed; 0 failed; 0 ignored; 0 measured
```

The regex change is fully backwards compatible, since test names are Rust
identifiers + `:`, and hence not special regex characters.

(See commits for details.)