Implement closure indirections.

Closure indirections live in the staticclosureinds section
and initially point to their corresponding closure in
the staticclosures.  The intent is that all code goes through
a closure indirection, and at runtime the indirections can
change.

These pieces of code have to go through closure indirections:

    - Code references to a static closure
    - SRTs
    - Heap check (but we want to fix this)
    - References to closures in RTS (see STATIC_CLOSURE) macro
    - Runtime symbol lookup (e.g. GHCi, dynwrapper)
    - The main closure passed to hs_main

Closure indirections should simplify these components (but that
is not implemented yet):

    - Windows DLL handling (which already needed an indirection)

In order to keep the code running, the fields of static closures
are not indirected (although they should be); this will be switched
over in a later commit.

Important invariant: an indirection may only be dereferenced
after the runtime is setup.  In particular, references to
closures in __attribute__(constructor) need to be kept indirections;
this is what the stable pointer deferral is for.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Implement runtime setup code for static closures.

This is a simple stub implementation which merely rewrites
all of the indirections into untagged pointers and untangles
references between the static closures.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Indirect SRTs and heap checks.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Remove _static_closure exports.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
CHARLIKE handling.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Closure table support.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
HEAP_ALLOCED replaced.

Signed-off-by: Edward Z. Yang <ezyang@mit.edu>