std::num: Add uint::next_power_of_two_opt

Like next_power_of_two, but returns None on overflow.
Resume inlining globals across crates

In #8185 cross-crate condition handlers were fixed by ensuring that globals
didn't start appearing in different crates with different addressed. An
unfortunate side effect of that pull request is that constants weren't inlined
across crates (uint::bits is unknown to everything but libstd).

This commit fixes this inlining by using the `available_eternally` linkage
provided by LLVM. It partially reverts #8185, and then adds support for this
linkage type. The main caveat is that not all statics could be inlined into
other crates. Before this patch, all statics were considered "inlineable items",
but an unfortunate side effect of how we deal with `&static` and `&[static]`
means that these two cases cannot be inlined across crates. The translation of
constants was modified to propogate this condition of whether a constant
should be considered inlineable into other crates.

Closes #9036
gitattributes: force LF line endings for all files

This avoids default CRLF on msysgit for Windows which can cause trouble.
Cf. https://help.github.com/articles/dealing-with-line-endings#text-eollf

Commit dad2ccc9b3b27d3f438eeea53b771cc85f6dfa32 followup.
Closes #7723.
extra::json: use a different encoding for enums.

It now uses `{"type": VariantName, "fields": [...]}`, which, according to
@Seldaek, since all enums will have the same "shape" rather than being a weird
ad-hoc array, will optimize better in javascript JITs. It also looks prettier,
and makes more sense.
std::vec: Fix hazards with uint overflows in unsafe code

Issue #8742

Add the method `.reserve_additional(n: uint)`: Check for overflow in
self.len() + n, and reserve that many elements (rounded up to next power
of two). Does nothing if self.len() + n < self.capacity() already.
std::vec: Add function vec::bytes::push_bytes

`push_bytes` is implemented with `ptr::copy_memory` here since this
function is intended to be used to implement `.push_str()` for str, so
we want to avoid the overhead.
std::str: Add bench tests for StrVector::connect() and for str::push_str
fix handling of function attributes

The `noalias` attributes were being set only on function definitions,
not on all declarations. This is harmless for `noalias`, but prevented
some optimization opportunities and is *not* harmless for other
attributes like `sret` with ABI implications.

Closes #9104
add sret + noalias to the out pointer parameter

This brings Rust in line with how `clang` handles return pointers.

Example:

    pub fn bar() -> [uint, .. 8] {
        let a = [0, .. 8];
        a
    }

Before:

    ; Function Attrs: nounwind uwtable
    define void @_ZN3bar17ha4635c6f704bfa334v0.0E([8 x i64]* nocapture, { i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #1 {
    "function top level":
      %a = alloca [8 x i64], align 8
      %2 = bitcast [8 x i64]* %a to i8*
      call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 64, i32 8, i1 false)
      %3 = bitcast [8 x i64]* %0 to i8*
      call void @llvm.memcpy.p0i8.p0i8.i64(i8* %3, i8* %2, i64 64, i32 8, i1 false)
      ret void
    }

After:

    ; Function Attrs: nounwind uwtable
    define void @_ZN3bar17ha4635c6f704bfa334v0.0E([8 x i64]* noalias nocapture sret, { i64, %tydesc*, i8*, i8*, i8 }* nocapture readnone) #1 {
    "function top level":
      %2 = bitcast [8 x i64]* %0 to i8*
      call void @llvm.memset.p0i8.i64(i8* %2, i8 0, i64 64, i32 8, i1 false)
      ret void
    }

Closes #9072
Closes #7298
Closes #9154
document why attributes are set on CallInst
testsuite: Add test for #4208

Closes #4208
Update rustpkg man page.

Closes #9221.

"rustpkg test" isn't implemented yet, so it shouldn't be in the manpage. Referring interested parties to the manual is probably
the right thing for now; eventually, these documents should merge.
Fix hardcoded string in libsyntax
set attributes on `invoke` instructions too

also removes the unused `FastInvoke` wrapper, as it's never actually
going to be used (we can't *partially* switch to `fastcc`, and this is
only used for Rust functions)
auto merge of #9109 : thestinger/rust/function, r=alexcrichton
Update syntax test
New rustpkg tutorial.
std::str: Fix overflow problems in unsafe code

See issue #8742
rt::io: Use vec::reserve_additional
std::at_vec: Fix segfault on overflow when resizing ~[@T]

Easy to reproduce:

    let mut v = ~[@1];
    v.resize(-1);  // success a.k.a silent failure
    v.push(@2); // segfault