Support linking of rlib files in rustpkg
Fix indention
Flag all TLS functions as inline(never)

There's lots of fun rationale in the comments of the diff.

Closes #11683
[std::vec] Rename .get_opt() to .get()
[std::vec] Rename .head_opt() to .head(), drop the old .head() behavior
[std::vec] Rename .last_opt() to .last(), drop the old .last() behavior
[std::vec] Rename .pop_opt() to .pop(), drop the old .pop() behavior
[std::vec] Rename .shift_opt() to .shift(), drop the old .shift() behavior
[std::vec] Rename .remove_opt() to .remove(), drop the old .remove() behavior
[std::path] Rename .container_as_str_opt() to .container_as_str(), drop the old .container_as_str() behavior
[std::str] Rename from_utf8_opt() to from_utf8(), drop the old from_utf8() behavior
[std::str] Rename from_utf8_owned_opt() to from_utf8_owned(), drop the old from_utf8_owned() behavior
[std::str] Remove the now unused not_utf8 condition.
auto merge of #11129 : SimonSapin/rust/foo-vs-foo_opt, r=alexcrichton

[On 2013-12-06, I wrote to the rust-dev mailing list](https://mail.mozilla.org/pipermail/rust-dev/2013-December/007263.html):

> Subject: Let’s avoid having both foo() and foo_opt()
>
> We have some functions and methods such as [std::str::from_utf8](http://static.rust-lang.org/doc/master/std/str/fn.from_utf8.html) that may succeed and give a result, or fail when the input is invalid.
>
> 1. Sometimes we assume the input is valid and don’t want to deal with the error case. Task failure works nicely.
>
> 2. Sometimes we do want to do something different on invalid input, so returning an `Option<T>` works best.
>
> And so we end up with both `from_utf8` and `from_utf8`. This particular case is worse because we also have `from_utf8_owned` and `from_utf8_owned_opt`, to cover everything.
>
> Multiplying names like this is just not good design. I’d like to reduce this pattern.
>
> Getting behavior 1. when you have 2. is easy: just call `.unwrap()` on the Option. I think we should rename every `foo_opt()` function or method to just `foo`, remove the old `foo()` behavior, and tell people (through documentation) to use `foo().unwrap()` if they want it back?
>
> The downsides are that unwrap is more verbose and gives less helpful error messages on task failure. But I think it’s worth it.


The email discussion has gone around long enough. Let’s discuss a concrete proposal. For the following functions or methods, I removed `foo` (that caused task failure) and renamed `foo_opt` (that returns `Option`) to just `foo`.

Vector methods:

* `get_opt` (rename only, `get` did not exist as it would have been just `[]`)
* `head_opt`
* `last_opt`
* `pop_opt`
* `shift_opt`
* `remove_opt`

`std::path::BytesContainer` method:

* `container_as_str_opt`

`std::str` functions:

* `from_utf8_opt`
* `from_utf8_owned_opt` (also remove the now unused `not_utf8` condition)

Is there something else that should recieve the same treatement?

I did not rename `recv_opt` on channels based on @brson’s [feedback](https://mail.mozilla.org/pipermail/rust-dev/2013-December/007270.html).

Feel free to pick only some of these commits.
auto merge of #11500 : jhasse/rust/patch-rlib, r=alexcrichton

Currently `rustpkg` only looks for shared libraries. After this patch it also looks for `*.rlib` files.
xfail another external macro test on android
auto merge of #11719 : brson/rust/bleh, r=alexcrichton
auto merge of #11711 : alexcrichton/rust/issue-11683, r=brson

There's lots of fun rationale in the comments of the diff.

Closes #11683
rustc/metadata: Removed stray debug statements
Allow trailing commas in argument lists and tuple patterns