more robust dependency injection in target ctors

Sometimes, codegen targets synthesize ScalaLibrary targets after
ScalaCompile.__init__ has already run, meaning they don't get
mandatory scala runtime dependencies injected into their dependency
list.

This change makes the ScalaLibrary constructor handle reading these
dependencies from config file and adding them to all ScalaLibrary
targets, with appropriate hooks in InternalTarget to allow other target
types to behave similarly.