Merge remote-tracking branch 'origin/swift-4.0-branch' into stable

* origin/swift-4.0-branch:
  [Modules] Fallback to building the module if a timeout occurs
  Modules: Use a PCMCache to manage memory buffers
  Modules: Hash the PCM content and use it as SIGNATURE
  Modules: Simplify CompilerInstance constructor, NFC
  Modules: Fix a minor performance bug from r293393
  Modules: Simplify the ModuleFile constructor; likely NFC
  Modules: Return early in ModuleManager::addModule; NFC
  Modules: Clean up ModuleFile::Imports in ModuleManager::removeModules
  Modules: Enforce that ModuleManager::removeModules deletes the tail
  Modules: Clarify ownership of ModuleFile instances in ModuleManager, NFC
  Modules: Return ModuleFile& from ModuleManager::begin, etc.; NFC
  Modules: Separate out a checkSignature helper, almost NFC