Fix a bug in SRT generation
I had good intentions, but they were not being followed. In particular,
--- - we never resolve a reference to a CAF to the contents of its SRT, since --- the point of SRTs is to keep CAFs alive.
was not true, because we updated the srtMap after generating the SRT
for a CAF. Therefore it was possible for another CAF to refer to an
earlier CAF, and the reference to the earlier CAF would be shortcutted
to refer to its SRT instead of pointing to the CAF itself.
The fix is just to not update the srtMap when generating the SRT for a
CAF, but I also refactored the code and comments around this to be a bit
Test Plan: Harbourmaster
Reviewers: bgamari, michalt, simonpj, erikd
Subscribers: rwbarton, thomie, carter
Differential Revision: https://phabricator.haskell.org/D4721