WIP: static compile round 2

This is largely complete. I'll probably try to merge it piecemeal, but I thought people might like to see the status of this.

- [ ] respect the jl_set_imaging_mode flag in some essential places (currently only sys0.ji gets the benefits of this)
- [ ] clean-up some platform-specific code (currently targets Mac)
- [ ] precompile a much greater set of functions
- [ ] lookup all external / ccall functions at runtime