Resource dependencies with FooDependency classes

This makes view configuration define explicitely the list of
dependencies on the models, route matching to primary key mappings
and query string parameters.