[backport] SI-6301 / SI-6572 specialization regressions

Squashed commit of the following:

commit a3680be29ccd5314c5d027d473b37940eaecd530
Author: Paul Phillips <paulp@improving.org>
Date:   Fri Aug 31 10:20:16 2012 -0700

    Actual fix for SI-6301, specialized crasher.

    This means the workaround in the previous commit is no
    longer reached, but it should remain where it is as a much
    needed layer of robustness/useful error reporting.

    Conflicts:
    	src/compiler/scala/tools/nsc/transform/SpecializeTypes.scala
    	src/compiler/scala/tools/nsc/typechecker/Duplicators.scala

commit f4c45ae204ce3ff3c16b19cab266d0b6515b6e0f
Author: Paul Phillips <paulp@improving.org>
Date:   Fri Aug 31 10:49:24 2012 -0700

    Rewrite of GenICode adapt.

    Started for debuggability, stayed for clarify/performance.

    Conflicts:
    	src/compiler/scala/tools/nsc/backend/icode/GenICode.scala

commit 74842f72a0af485e5def796f777f7003f969d75b
Author: Paul Phillips <paulp@improving.org>
Date:   Fri Aug 31 08:45:34 2012 -0700

    Workaround for SI-6301, @specialize crasher.

    SpecializeTypes is generating symbols with overloaded types
    which then proceed to crash in CleanUp or GenICode.  Until I
    or someone works out why that is, take a look in case the
    overload is easily disambiguated by the argument list arity,
    in which case warn and proceed.
SI-6572 Test case, originally fixed in a3680be.

That fix has now been backported to 2.10.x in the
previous commit. This commit should be be merged
to master.
Merge pull request #2006 from retronym/backport/1226

[backport] SI-6301 / SI-6572 specialization regressions