Store ProjectTotal data in database

Closes #466.
You can add it to project_specs as well.