split platform definitions out of mk/platform.mk

The goal here is to make it easier to add new platform definitions,
especially when the additions are programmatic (ie: in build scripts).
Fix monomorphization of unboxed closures

This adds a `Substs` field to `ty_unboxed_closure` and plumbs basic
handling of it throughout the compiler. trans now correctly
monomorphizes captured free variables and llvm function defs.  This
fixes uses of unboxed closures which reference a free type or region
parameter from their environment in either their signature or free
variables.  Closes #16791
Add regression test for issue #16791
auto merge of #18144 : bkoropoff/rust/mighty-monomorphizin-unboxed-closures, r=nikomatsakis

This allows unboxed closures that reference free type/region parameters to be monomorphized correctly in trans.

It was necessary to make `ty_unboxed_closure` carry around a `Substs` to accomplish this.  Plumbing this through typeck revealed several areas where type/region parameters in unboxed closure types are possibly not being handled correctly.  Since my goal was just to fix trans, I decided to leave FIXME comments on areas that still need attention and seek feedback on the best way to clean them up, possibly as a follow-up PR.

Closes #16791
auto merge of #18192 : jmesmon/rust/platform-generic, r=alexcrichton

The goal here is to make it easier to add new platform definitions,
especially when the additions are programmatic (ie: in build scripts).
Convert some notes to help messages

Closes #18126.