Resolve globals having different addresses across crates

* All globals marked as `pub` won't have the `internal` linkage type set
* All global references across crates are forced to use the address of the
  global in the other crate via an external reference.

r? @graydon