Use API visitor in NameHashing class.

The NameHashing was implementing (poorly) a simple visitor
that would collect all public defs in given SourceAPI.

I discovered that there's a proper Visitor class for SourceAPI
and migrated NameHashing logic to use it.

As a bonus, we properly include definitions in structural types now.
Move extraction of used names into a separate class.
Fixup 044eb3b057242c1a1bb641808ca61775b933b91e
Refactor ScalaCompilerForUnitTesting.

Refactor ScalaCompilerForUnitTesting by introducing a new method
`extractApiFromSrc` which better describes the intent than
`compileSrc`. The `compileSrc` becomes a private, utility method.
Rework used names extraction.

Logic responsible for deciding whether a given symbol's name is
added to the list of used names has been moved to separate
method called `eligibleAsUsedName`. I expect this method to be
tweaked in the future (for example, we might want to index
synthetic names).

Also, the new logic handles import nodes properly. Import nodes
require special handling for two reasons:

  * import node itself has a term symbol associated with it
    with a name `<import`>. I tried to track down what role
    this symbol serves but I couldn't. It doesn't look like
    there are many places in Scala compiler that refer to
    that kind of symbols explicitly
  * ImportSelector is not subtype of Tree therefore is not
    processed by `Tree.foreach`

Changes from this commit are covered by a new JUnit test.
Add dependency on junit-interface.

This way JUnit tests can be run in sbt.