auto merge of #5309 : nikomatsakis/rust/simplify_check_fn, r=nikomatsakis

Simplify the interface to check_fn by pulling some of the madness out to its callers.

rs=refactor
Fix formatting and errors in std::getopts example.

There were three issues effecting the example in the getopts rustdoc:

1. The blockquote was incorrectly formatted.  Fixed by switching to using
   an explicit markdown code section with ```.
2. The `fail fail_str(f)` would not compile.  Fixed by using `fail!()` instead
   of `fail`.
3. The line `matches.free[0]` produced a compile error about moving from
   an immutable vector.  Fix by using `copy`.
Correct copyright year to be 2012-2013.

Previous year range of 2011-2013 was based on file creation date.  The
check_license python script, however, only accepts copyrights starting
in 2012 or later.
auto merge of #5308 : wanderview/rust/std-getopts-rustdoc-fix, r=luqmana

There were three issues effecting the example in the getopts rustdoc:

1. The blockquote was incorrectly formatted.  Fixed by switching to using
   an explicit markdown code section with ```.
2. The `fail fail_str(f)` would not compile.  Fixed by using `fail!()` instead
   of `fail`.
3. The line `matches.free[0]` produced a compile error about moving from
   an immutable vector.  Fix by using `copy`.
Revamp foreign code not to consider the Rust modes.  This requires
adjusting a few foreign functions that were declared with by-ref
mode.  This also allows us to remove by-val mode in the near future.

With copy mode, though, we have to be careful because Rust will implicitly pass
somethings by pointer but this may not be the C ABI rules.  For example, rust
will pass a struct Foo as a Foo*.  So I added some code into the adapters to
fix this (though the C ABI rules may put the pointer back, oh well).

This patch also includes a lint mode for the use of by-ref mode
in foreign functions as the semantics of this have changed.
Remove `++` mode from the compiler (it is parsed as `+` mode)
and obsolete `-` mode altogether (it *was* parsed as `+` mode).