rustc: Disable rpath settings by default

This commit disables rustc's emission of rpath attributes into dynamic libraries
and executables by default. The functionality is still preserved, but it must
now be manually enabled via a `-C rpath` flag.

This involved a few changes to the local build system:

* --disable-rpath is now the default configure option
* Makefiles now prefer our own LD_LIBRARY_PATH over the user's LD_LIBRARY_PATH
  in order to support building rust with rust already installed.
* The compiletest program was taught to correctly pass through the aux dir as a
  component of LD_LIBRARY_PATH in more situations.

The major impact of this change is that neither rustdoc nor rustc will work
out-of-the-box in all situations because they are dynamically linked. It must be
arranged to ensure that the libraries of a rust installation are part of the
LD_LIBRARY_PATH. The default installation paths for all platforms ensure this,
but if an installation is in a nonstandard location, then configuration may be
necessary.

Additionally, for all developers of rustc, it will no longer be possible to run
$target/stageN/bin/rustc out-of-the-box. The old behavior can be regained
through the `--enable-rpath` option to the configure script.

This change brings linux/mac installations in line with windows installations
where rpath is not possible.

Closes #11747
[breaking-change]
librustc: Apply null pointer optimization to slices, closures and trait
objects.
librustc: Remove match arm since we don't allow enum to float casts.
librustc: Don't create &[T] slices with NULL as the ptr.
Add tests for null pointer opt.
librustc: Accept type aliases for structures in structure literals and
structure patterns.

Closes #4508.
libcore: Fix Items iterator for zero sized types.
librustc: Disallow modules and types from having the same name.

This will break code that looks like:

    struct Foo {
        ...
    }

    mod Foo {
        ...
    }

Change this code to:

    struct Foo {
        ...
    }

    impl Foo {
        ...
    }

Or rename the module.

Closes #15205.

[breaking-change]
librustc (RFC #34): Implement the new `Index` and `IndexMut` traits.

This will break code that used the old `Index` trait. Change this code
to use the new `Index` traits. For reference, here are their signatures:

    pub trait Index<Index,Result> {
        fn index<'a>(&'a self, index: &Index) -> &'a Result;
    }
    pub trait IndexMut<Index,Result> {
        fn index_mut<'a>(&'a mut self, index: &Index) -> &'a mut Result;
    }

Closes #6515.

[breaking-change]
Improve non-exhaustive pattern witnesses for structs with multiple fields
auto merge of #15440 : pcwalton/rust/struct-aliases, r=brson

Closes #4508.

r? @nick29581
librustc: Update debuginfo.
auto merge of #15394 : pcwalton/rust/new-index-traits, r=nick29581

This will break code that used the old `Index` trait. Change this code
to use the new `Index` traits. For reference, here are their signatures:

    pub trait Index<Index,Result> {
        fn index<'a>(&'a self, index: &Index) -> &'a Result;
    }
    pub trait IndexMut<Index,Result> {
        fn index_mut<'a>(&'a mut self, index: &Index) -> &'a mut Result;
    }

Closes #6515.

[breaking-change]

r? @nick29581
auto merge of #15406 : luqmana/rust/nop, r=pcwalton

Extend the null ptr optimization to work with slices, closures, procs, & trait objects by using the internal pointers as the discriminant.

This decreases the size of `Option<&[int]>` (and similar) by one word.
mk: Run tidy after tests in 'make check'

Tidy takes like forever to run.
auto merge of #15443 : pcwalton/rust/module-and-type-with-same-name, r=nick29581

This will break code that looks like:

    struct Foo {
        ...
    }

    mod Foo {
        ...
    }

Change this code to:

    struct Foo {
        ...
    }

    impl Foo {
        ...
    }

Or rename the module.

Closes #15205.

[breaking-change]

r? @nick29581
auto merge of #15508 : jakub-/rust/struct-pattern-witness, r=alexcrichton
auto merge of #15516 : brson/rust/tidy, r=alexcrichton

Tidy takes like forever to run. How many times have I wished I didn't have to sit through tidy before seeing my tests fail?
Change DST syntax: type -> Sized?

closes #13367

[breaking-change] Use `Sized?` to indicate a dynamically sized type parameter or trait (used to be `type`). E.g.,

```
trait Tr for Sized? {}

fn foo<Sized? X: Share>(x: X) {}
```
rustc: Fix naming output files with --crate-name

The output file was only being renamed based off #[crate_name], not #[crate_id]
or --crate-name. Both of these behaviors have been restored now.