Extract dependency handling in Dependency.scala into its own method.

There's fairly non-trivial logic that handles dependencies on symbols.
This change extract it into its own method so it can be reused in
other parts of the code.
Add a pending test-case for dependency introduced by TypeRef only.

We test a scenario where the dependency is introduce only by a
TypeRef. In this specific case, we refer to a type only as an argument
to another type.

This test-case fails because we do not traverse types properly.
Refactor ExtractDependenciesTraverser

Move the ExtractDependenciesTraverser class outside of the extractDependencies
method. The class is rather complex so it's easier to read its code if it's
not nested.

Also, introduced `dependencies` method on traverser that better
encapsulates post-traverse logic.
Traverse types to extract all dependencies.

Introduce a type traverser that allows us to collect all symbols
referred by a given Type. The implementation of the traverser is inspired
by `CollectTypeCollector` from Scala 2.10.

Use that traverser to collect all symbols referred by a type assigned to
a type tree.

This makes `source-dependencies/typeref-only` test to pass.