Start cleaning up

Remove some of the model class and adjust some others to follow the
change we want to do in the database.
Add upgrade sql script cleaning up the database for release 0.6.1
Fix the stats page display

This commit fixes the display of the Package Stats that was broken
with the recent changes.

I also reduce the number of calls to the database by storing the
results of the queries maintain_select and top_owners_select in
memory. This way they are ran once instead of twice.