use available_externally linkage for cross-crate inlined functions
make CrateContext fields private
split CrateContext into shared and local pieces
run optimization and codegen on worker threads