Don't update ModDetails with CafInfos when opts are disabled

This is consistent with the interface file behavior where we omit
HsNoCafRefs annotations with -fomit-interface-pragmas (implied by -O0).

ModDetails and ModIface are just different representations of the same
thing, so they really need to be in sync. This patch does the right
thing and does not need too much explanation, but here's an example of a
problem not doing this causes in !2842:

    -- MyInteger.hs
    module MyInteger
      ( MyInteger (MyInteger)
      , ToMyInteger (toMyInteger)
      ) where

    newtype MyInteger = MyInteger Integer

    class ToMyInteger a where
      toMyInteger :: a -> MyInteger

    instance ToMyInteger Integer where
      toMyInteger = MyInteger {- . succ -}

    -- Main.hs
    module Main
      ( main
      ) where

    import MyInteger (MyInteger (MyInteger), toMyInteger)

    main :: IO ()
    main = do
      let (MyInteger i) = (id . toMyInteger) (41 :: Integer)
      print i

If I build this with -O0, without this fix, we generate a ModDetails with
accurate LFInfo for toMyInteger (MyInteger.$fToMyIntegerInteger) which says that
it's a LFReEntrant with arity 1. This means in the use site (Main) we tag the
value:

    R3 = MyInteger.$fToMyIntegerInteger_closure + 1;
    R2 = GHC.Base.id_closure;
    R1 = GHC.Base.._closure;
    Sp = Sp - 16;
    call stg_ap_ppp_fast(R4, R3, R2, R1) args: 24, res: 0, upd: 24;

Now we change the definition by uncommenting the `succ` part and it becomes a thunk:

    MyInteger.$fToMyIntegerInteger [InlPrag=INLINE (sat-args=0)]
      :: MyInteger.ToMyInteger GHC.Integer.Type.Integer
    [GblId[DFunId(nt)]] =
        {} \u [] $ctoMyInteger_rEA;

and its LFInfo is now LFThunk. This change in LFInfo makes a difference in the
use site: we can no longer tag it.

But becuase the interface fingerprint does not change (because ModIface does not
change) we don't rebuild Main and tag the thunk.

(1.2% increase in allocations when building T12545 on armv7 because we
generate more code without CafInfos)

Metric Increase:
    T12545
23 jobs for master in 481 minutes and 9 seconds (queued for 5 seconds)
Status Job ID Name Coverage
  Lint
passed #283575
lint
lint-linters

00:00:16

passed #283578
lint
lint-submods-branch

00:00:17

passed #283576
lint
lint-testsuite

00:00:17

passed #283577
lint
typecheck-testsuite

00:00:14

 
  Quick Build
passed #283579
x86_64-linux
hadrian-ghc-in-ghci

00:13:34

 
  Build
passed #283580
x86_64-linux
validate-x86_64-linux-deb9-hadrian

02:17:40

 
  Full Build
failed #283583
aarch64-linux allowed to fail
validate-aarch64-linux-deb9

03:16:37

failed #283584
armv7-linux
validate-armv7-linux-deb9

04:18:58

passed #283585
x86_64-linux
validate-i386-linux-deb9

01:48:08

failed #283592
new-x86_64-windows test allowed to fail
validate-i386-windows

passed #283582
x86_64-darwin
validate-x86_64-darwin

01:12:08

passed #283586
x86_64-linux
validate-x86_64-linux-deb9-debug

01:20:34

passed #283588
x86_64-linux
validate-x86_64-linux-deb9-dwarf

02:22:12

passed #283587
x86_64-linux
validate-x86_64-linux-deb9-integer-simple

01:27:29

passed #283581
x86_64-linux
validate-x86_64-linux-deb9-unreg-hadrian

02:58:55

passed #283589
x86_64-linux
validate-x86_64-linux-fedora27

01:19:19

failed #283591
new-x86_64-windows test allowed to fail
validate-x86_64-windows

failed #283590
new-x86_64-windows test allowed to fail
validate-x86_64-windows-hadrian

 
  Cleanup
passed #283593
x86_64-darwin
cleanup-darwin

00:00:22

 
  Packaging
skipped #283594
x86_64-linux allowed to fail
doc-tarball
 
  Testing
skipped #283595
x86_64-linux allowed to fail manual
hackage
skipped #283596
x86_64-linux
perf-nofib
 
  Deploy
skipped #283597
x86_64-linux allowed to fail
pages
 
Name Stage Failure
failed
validate-x86_64-windows Full Build There has been a timeout failure or the job got stuck. Check your timeout limits or try again
No job log
failed
validate-aarch64-linux-deb9 Full Build
Uploading artifacts...
ghc-aarch64-linux-deb9.tar.xz: found 1 matching files
junit.xml: found 1 matching files

performance-metrics.tsv: found 1 matching files

Uploading artifacts to coordinator... ok
id=283583 responseStatus=201 Created token=BsQfT8_Y
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=283583 responseStatus=201 Created token=BsQfT8_Y
ERROR: Job failed: exit code 1
failed
validate-armv7-linux-deb9 Full Build
Uploading artifacts...
ghc-armv7-linux-deb9.tar.xz: found 1 matching files
junit.xml: found 1 matching files

performance-metrics.tsv: found 1 matching files

Uploading artifacts to coordinator... ok
id=283584 responseStatus=201 Created token=YEN5hc3q
Uploading artifacts...
junit.xml: found 1 matching files

Uploading artifacts to coordinator... ok
id=283584 responseStatus=201 Created token=YEN5hc3q
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows-hadrian Full Build There has been a timeout failure or the job got stuck. Check your timeout limits or try again
No job log
failed
validate-i386-windows Full Build There has been a timeout failure or the job got stuck. Check your timeout limits or try again
No job log