[backport] SI-7470 implements fundep materialization

Backports 21a8c6c from the 2.11.x branch under -Xfundep-materialization
as per Miles Sabin's request. Thanks Miles!
pull request feedback
-Xfundep-materialization => -Yfundep-materialization

To quote gkossakowski:

  Thinking about it more, could we hide this behind 'Y' flag instead?
  We have lesser obligation to keep around Y flags and this is something
  we should remove from 2.11/2.12.
Merge pull request #3859 from xeno-by/topic/fundep-materialization-210x

[backport] SI-7470 implements fundep materialization
Merge commit '9ecfac8' into merge/2.10.x-2.11.x-20140915
Merge pull request #3983 from retronym/merge/2.10.x-2.11.x-20140915

Merge 2.10.x to 2.11.x