Refactored int/uint range code in preparation for change to range_rev semantics.

Also added unit tests of range code to test refactoring.  The
num-range-rev.rs test will need to be updated when the range_rev
semantics change.
Switch over to new range_rev semantics; fix #5270.
Fix #5270: another test I did not update properly.
Permit C-style enums in vector repeat length expressions (N.B. values only, not type signatures)
Rename Option swap_unwrap to take_unwrap. Fixes Issue#7764
auto merge of #7684 : pnkfelix/rust/fsk-invert-range-rev-halfclosedness-issue5270-2ndpr, r=cmr

Changes int/uint range_rev to iterate over range `(hi,lo]` instead of `[hi,lo)`.

Fix #5270.

Also:
* Adds unit tests for int/uint range functions
* Updates the uses of `range_rev` to account for the new semantics.  (Note that pretty much all of the updates there were strict improvements to the code in question; yay!)
* Exposes new function, `range_step_inclusive`, which does the range `[hi,lo]`, (at least when `hi-lo` is a multiple of the `step` parameter).
* Special-cases when `|step| == 1` removing unnecessary bounds-check.  (I did not check whether LLVM was already performing this optimization; I figure it would be a net win to not leave that analysis to the compiler.  If reviewer objects, I can easily remove that from the refactored code.)

(This pull request is a rebased version of PR #7524, which went stale due to recent unrelated changes to num libraries.)
Add project information to l10n templates.
auto merge of #7827 : jdm/rust/enumlength, r=graydon

Allowing them in type signatures is a significant amount of extra work, unfortunately. This also doesn't apply to static values, which takes a different code path.
test: new codegen tests, rename hello.
Add a `get_mut` method for TLS

Simulates borrow checks for '@mut' boxes, or at least it's the same idea.
Sort lint attributes to print them in a more sane way

Closes #7818
auto merge of #7831 : ozten/rust/issues-7764-swap_unwarp-take-unwrap, r=pcwalton

Fixes Issue #7764

Running `make check` I do get a failure:

    test rt::io::extensions::test::push_bytes ... ok
    rustest rt::comm::test::oneshot_single_thread_send_port_close ... t: task failed at 'Unhandled condition:
     read_error: {kind: OtherIoError, desc: "Placeholder error. You shouldn\'t be seeing this", detail: None}',
     /Users/shout/Projects/rust/src/libstd/condition.rs:50
    /bin/sh: line 1: 35056 Abort trap: 6           x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin --logfile
     tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.log
    make: *** [tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.ok] Error 134
Make all lang_items optional

Whenever a lang_item is required, some relevant message is displayed, often with
a span of what triggered the usage of the lang item
auto merge of #7828 : alexcrichton/rust/lang-opt, r=graydon

Whenever a lang_item is required, some relevant message is displayed, often with
a span of what triggered the usage of the lang item.

Now "hello word" is as small as:

```rust
#[no_std];

extern {
    fn puts(s: *u8);
}

extern "rust-intrinsic" {
    fn transmute<T, U>(t: T) -> U;
}

#[start]
fn main(_: int, _: **u8, _: *u8) -> int {
    unsafe {
        let (ptr, _): (*u8, uint) = transmute("Hello!");
        puts(ptr);
    }
    return 0;
}
```
auto merge of #7839 : graydon/rust/new-codegen-tests, r=pcwalton

Add some codegen tests. Nothing too surprising.
auto merge of #7841 : alexcrichton/rust/tls++, r=huonw

Simulates borrow checks for '@mut' boxes, or at least it's the same idea. This allows you to store owned values, but mutate them while they're owned by TLS.

This should remove the necessity for a `pop`/`set` pattern to mutate data structures in TLS.
auto merge of #7835 : omasanori/rust/l10n-improvement, r=pnkfelix

Adding options for `po4a` in `mk/docs.mk` and updating .pots.
auto merge of #7843 : alexcrichton/rust/better-lint-help, r=huonw

Closes #7818