add GetLatestInputVersions to db interface

determines the latest applicable set of inputs for a job, based on its input
constraints (passed jobs, etc.)