EE version: Clean up the Project model to reduce conflicts
This is the EE version of MR gitlab-ce!11967. It includes the changes of said MR along with moving all EE specific code (except for some
prepend calls) to separate concerns. This should ensure the model is almost identical for both CE and EE, reducing the number of merge conflicts.