Cache the most recently created SubstTypeMap.

I discovered that a 1-element cache for SubstTypeMaps
gave a 75-90% hit rate.
cleans up 82f0925

Updates comments, implements accidentally forgotten IMPLPARAM_TREE,
creates a test to ensure that nothing else is overseen.
Merge pull request #2582 from paulp/pr/SubstTypeMap

Cache the most recently created SubstTypeMap.
fixes a crash on a degenerate macro definition

Previous version of the MacroImplReference extractor didn't take into
the account the fact that RefTree.qualifier.symbol can be null (and it can
be null if RefTree is an Ident, because then qualifier is an EmptyTree).

This led to NPEs for really weird macro defs that refer to local methods
as their corresponding macro impls. Now I check for this corner case,
and the stuff now longer crashes.

This was wrong; this is how I fixed it; the world is now a better place.
unifies handling of T's in various analyses of Foo[T]'s
Merge pull request #2622 from scalamacros/pullrequest/paradise

Backport from paradise/macros
Added flag for rich for comprehension syntax
Make then a proper keyword under Yrich-for