Enhance auto_encode to take number of struct fields

emit_struct and read_struct takes an additional len:uint parameter which tells
us how many fields the struct we are working on has.

This is required to implement an Encoder for the msgpack [1] serialization
format. To serialize a struct with msgpack you have to use arrays and the size
of the array has to be know before each of the elements are written out. JSON
as an example doesn't have this problem as it uses '[' and ']' delimiters for
arrays.

[1]: www.msgpack.org
A collection of refactorings that I found it hard/tiresome to divide:

- Make `extern fn()` assignable to any closure type, rather than
  a subtype.
- Remove unused int_ty_set and float_ty_set
- Refactor variable unification and make it more DRY
- Do fn sub/lub/glb on the level of fn_sig
- Rename infer::to_str::ToStr to infer::to_str::InferStr
- Capitalize names of various types
- Correct hashing of FnMeta
- Convert various records-of-fns into structs-of-fns.  This is both
  eliminating use of deprecated features and more forwards compatible
  with fn reform.

r=pcwalton
rt: Remove unused command line parsing
core: fix crashing vec methods due to non-working moved self.
std: fix net::tcp::test fallout from 2db3abd harder
libcore: Fix import in libc. rs=bustage
libcore: Fix Windows resolve errors. rs=bustage
libcore: Some more fixes to Windows libc stuff. rs=bustage
libcore: Fix missing `off_t` import on Mac. rs=bustage
Rename memcpy, memmove, memset to prevent any confusion with the C equivalents.

Closes #4203.
Fix: BigInt tests fail on 32-bit platforms
test: fix check-fast breakage.
librustc: Allow the type parameter version of `Self` to be spelled with a capital S
librustc: Implement `&static` as the replacement for `Durable`. r=nmatsakis
Merge pull request #4414 from gifnksm/bigint-test

Issue 4393 BigInt tests fail on 32-bit platforms
mode: reset mode on entry to fn body.

This is an interim fix to address the "Beware!" unsoundness.  I have a
more comprehensive rewrite of mode.rs in the pipeline.

r=pcwalton
tests: Add two test cases, one xfailed
correct expected error msgs in various tests rs=breakage
Add test cases: one xfailed, one not
Add working test for issue 3935 and xfailed test for issue 3888