Merge GitLab CI into GitLab CE

The idea is to integrate GitLab CI with GitLab CE.

The advantages are:

  1. Automatic enabling of CI for new projects that contain .gitlab-ci.yml (zero-config)
  2. Showing the build status for commits and branches index pages (with a commit status API to allow other services to do the same)
  3. Reduce duplicate project information
  4. Reduce duplicate code for storing secrets
  5. We prevent duplicating a lot of configuration between apps
  6. We can stop cross-linking CI and CE via OAuth, removing a barrier
  7. Reduce the number of normal backups and backing up secrets
  8. Interface updates will be simultaneous, no effort to improve CI UI separately
  9. This will make GitLab CI more popular
  10. Easier to deeply integrate the results in the merge request (show code coverage in diff)
  11. We can throw away 50% of CI code if merged
  12. Less memory usage if you want to run both CE and CI (for example on a Raspberry Pi) since it is only a few thousand lines of code, almost of of the gems are shared
  13. We can add enterprise features to CI without creating another repo like CI-EE
  14. It will fix a lot of SSL/Nginx issues when connecting CI with CE
  15. We could effectively reuse code for implemented Services
  16. It will nicely integrate with GitLab CE UI: commit statuses, charts, builds view

Disadvantages are:

  1. More memory used by CE (will only be a little)
  2. If you runners overload CI your CI system now both go down
  3. Database will be larger, although build logs are stored in text files now
  4. The CE interface will get more cluttered with CI settings and status
  5. It takes longer to boot development
  6. It takes longer to run tests
  7. It takes longer to understand and explore the project
  8. You can't host CI on different machine than CE

The transition would mean:

  1. New urls (prefixed with /ci)
  2. Integrating the database (prefix with ci_)

/cc @dzaporozhets @ayufan