Stamp out space leaks from demand analysis

Authored by rwbarton on Apr 1 2017, 10:51 AM.

Description

Stamp out space leaks from demand analysis

This reduces peak memory usage by ~30% on my test case (DynFlags),
and (probably as a result of reduced GC work) decreases compilation
time by a few percent as well.

Also fix a bug in seqStrDmd so that demeand info is fully evaluated.

Reviewers: simonpj, austin, bgamari

Reviewed By: bgamari

Subscribers: dfeuer, thomie

Differential Revision: https://phabricator.haskell.org/D3400