Break out const_addr_of.
Implement most of adjustment handling for consts.

Changes the ad-hoc closure adjustment into using adjustment info instead
of being separately driven from types, and likewise for autoderef.

Also takes care of autoref (the cases we should be seeing in consts,
at least, since we can't be doing method calls which would need the
ref-to-vec mode), which didn't quite work right previously.

However, "dereference" of a newtype isn't handled yet....
Let const_deref "dereference" newtypes.
Make a const translation test match TESTNAME=const
Don't print addr_of(addr_of(e)) as `&&e`, which means something else.
Add some tests for const auto-deref.

const-autoderef.rs is based on an example from jdm in IRC (but the
quadruple-pointer part is entirely my fault).
Don't copy const data to do an autoderef+autoref.
Const dereference works now, so allow it.
treemap: make set_advance public
treemap: indentation fixes
treemap: inline the TreeSet wrappers
treemap: add more tests for set difference
Work on 0.6 release notes
treemap: refactor the set operation tests
treemap: add more set tests
treemap: fix a bug in the union implementation
Implement Add on Option types

This will allow you to use the + operator to add together any two
Options, assuming that the contents of each Option likewise implement
+. So Some(4) + Some(1) == Some(5), and adding with None leaves the
other value unchanged.

This might be monoidic? I don't know what that word means!
Fix std::getopts::opts_present() to check value.

Currently the opts_present() function only checks to see if the option is
configured in the match, but doesn't actually check to see if the option
value has been set.  This means that opt_present('h') may return false while
opts_present([~'h']) returns true.

Add a test case to catch this condition and fix opts_present() to check
the value before returning true.

Note, there is another API difference between these two functions that this
does not address.  Currently if you pass a non-configured option to
opt_present() the program will fail!(), but opts_present() simply returns
false.  If it is acceptable to standardize on the fail!() then opts_present()
should probably be implemented in terms of the opt_present() function.
auto merge of #5304 : jld/rust/const-adjustments, r=graydon

These changes make const translation use adjustments (autodereference, autoreference, bare-fn-to-closure), like normal code does, replacing some ad-hoc logic that wasn't always right.

As a convenient side-effect, explicit dereference (both of pointers and of newtypes) is also supported in const expressions.

There is also a “bonus fix” for a bug in the pretty-printer exposed by one of the added tests.
Avoid propagating link_arg values that are unlikely to be resolveable under arbitrary directories.