Fix bug in query builder that stopped multiple where clauses being run on the same column.
Implement download entity and related stuff. Will build things like user quota on top of this.