Add option to mirror an upstream repository.
Closes internal https://dev.gitlab.org/gitlab/gitlab-ee/issues/279
Depends on gitlab-org/gitlab-shell!29
To do:
- [x] Decide on what user should be the author of the activity feed events. The initial project creator perhaps? That makes sense for personal projects, but less so for group projects, where it's even possible that the creator has since left the team.
- [x] Write specs!
- [x] Write documentation
- [x] Port back relevant commits to CE: gitlab-org/gitlab-ce!1822
----
## Mirror status on project homepage

## Settings navigation item

## Mirroring settings

## Activity feed with new "pushes" (mirror updates)

I have yet to decide on what user should be the author of these events. The initial project creator perhaps? That makes sense for personal projects, but less so for group projects, where it's even possible that the creator has since left the team.
## Warning that branch has diverged from upstream

## Commits heading after failed update

Link send user to the mirroring settings if they are a project admin.
## Mirroring settings after failed update

## New project page

## Import form after failed import
(Screenshot outdated)

Shown when the initial import of a project fails, not when an update of an existing project fails.
cc @dzaporozhets @sytses @JobV
See merge request !51
Display target branch on MR list when it is different from project's default
Fixes#3072
The screenshot below shows both previous and current UI state:

First merge request has default branch as a target, second one has non default branch as target.
See merge request !1741
Simply type a name with a `/` directory separator and new directories
will be created. This does not do the fancy UI work that github.com
does, but it will get the job done.
I could not find tests for file creation, so I didn't add a test for
this slight behaviour modification. I did test directory traversals
though, using both absolute paths like `/tmp/foo.txt` and relative paths
like `../../foo.txt`. Neither case escaped the repository, though
attempting to traverse with a relative path resulted in a 500 error that
did not affect application stability upon reload.
Fix error preventing displaying of commit data for a directory with a leading dot
Directories with leading dots erroneously get rejected by the route controller if git
ref regex is used in constraints. This prevents commit data from being loaded. The regex verification is now done in controller.
Closes https://github.com/gitlabhq/gitlabhq/issues/8763
See merge request !1574
Change "+" icon under "Files" section to have three options:
* Create file
* Upload file
* New directory
Upload file is no longer accessible from the "Create file" page.
Users can now select a target branch in upload file as well.
Closes#2799: Fixes a bug where file modes were overwritten after a commit
Closes https://github.com/gitlabhq/gitlabhq/issues/8253: Existing files
can no longer be overwritten in the "Create file" section.
Closes#2557