Add denormalized fields to package

Querying packages last build and resolution are the bottlenecks for the
frontend. I don't see any other possible optimization that would significantly
improve the situation.
Add triggers for keeping denormalized fields in sync
Tests for triggers
Migration for triggers and denorm field data
Use denormalized fields in frontend and backend
Make sqlalchemy accept my foreign key
Remove spurious joinedloads
Don't run trigger-dependent tests on sqlite
Subqueryload for koji_task
Custom pagination code
Sorted index on build.package_id
Migration for foreign key constraint on last_complete_build_id
Report packages with no builds as ignored state_string
Code cleanup
PEP8 changes