Abstract over dependency kind in Analysis

Work in progress to make it easier to add new kinds of dependency.

Please see this discussion : https://groups.google.com/forum/#!topic/sbt-dev/clIbzCp9VX8
I think `mri.asInstanceOf[Relation[File, File]]` should be extracted to a separate variable. Same goes for all other casts.