Populate the Build.collection_id column

Summary:
Tag builds with a collection_id when they are created from:
- A commit
- A phabricator diff
- A changes retry

Depends on D79833

Test Plan: Unit tests

Reviewers: ar, vishal

Reviewed By: ar, vishal

Subscribers: cramer, ar, cf, reviews-dfbgrowth, christoffer

Projects: #changes

Maniphest Tasks: T25400

Differential Revision: https://tails.corp.dropbox.com/D79840