PR #200041 disabled application extension during scanning to increase
module cache reuse. To keep the build semantics intact, the setting was
preserved for the compile steps. When scanning with an explicitly-built
PCH, this triggers a mismatch error in `ASTReader`:
```
error: Objective-C App Extension was enabled in precompiled file 'X.pch' but is currently disabled
```
This PR fixes this by only performing the optimization for non-PCH
compiles, adds a test, and a FIXME outlining how this optimization could
be applied even for compiles with PCHs.
rdar://180978125