Simplify queries for getting jobtype code

This simplifies the code and should reduce the required number of SQL
queries needed to one (depending on what SQLAlchemy makes of this).
Added single item API for software requirements