1. Change multiple updates to a single `update_all`
2. Use cascading deletes
3. Extract an average function for the database median.
4. Move database median to `lib/gitlab/database`
5. Use `delete_all` instead of `destroy_all`
6. Minor refactoring
- These are not being used anymore.
- Consolidate all issue metrics into a single migration.
- Consolidate all merge request metrics into a single migration.