Replace most Foundation imports with Darwin or nothing

Importing `Foundation` is only really necessary when using `NSArray`, `NSDictionary`, etc.; for GCD you can import `Dispatch`; for pthreads you can import `Darwin`; otherwise, no import is necessary.