Import the database as the `git` user

This ensures that all tables created during the import belong to `git`.
If you import as a different user, such as the `postgres` superuser, you
may encounter issues where the GitLab database user cannot access tables
in gitlabhq_production, _even if_ `git` is the owner of
gitlabhq_production at the time of import.
prevent events loading while loading events refs #49759
Fix milestones description's max length
Fix 404 error when clicking the branch link on hipchat message
Include "Merge-request reopened" emails in the proper email thread
# This is a combination of 2 commits.
# The first commit's message is:

Patched `MergeRequest` to return more data.

Patched `MergeRequest` to return the `description` & `milestone`
Conflicts:
	lib/api/entities.rb

# This is the 2nd commit message:

Update merge_requests.md

Update documentation for merge request endpoint adding support for description.
Patched `MergeRequest` to return more data.
Added milestone to merge_requests instead of milestone id.
Rtrim input before checking if form is empty
Add dealing with newlines for editor to 5.1-to-6.0

backport of https://github.com/gitlabhq/gitlabhq/commit/2d681c0d1ed14bf23c041aa04fa3e77caceda9a1
add git config --global core.autocrlf check

core.autocrlf was added to install guide in https://github.com/gitlabhq/gitlabhq/commit/2d681c0d1ed14bf23c041aa04fa3e77caceda9a1 but not added to check script
Move LDAP timeout code to Gitlab::LDAP::Access
Cache LDAP check in Gitlab::UserAccess

This changes the number of LDAP calls when users access GitLab via
Git-over-SSH or the API. LDAP check results are cached for 1 hour.
Add a spec for User#requires_ldap_check?
Skip LDAP cache check when LDAP is disabled
Increase import timeout from 2 to 4 minutes

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Merge branch 'increase-import-timeout' into 'master'

Increase import timeout

Increase import timeout from 2 to 4 minutes. It allows repositories like `gitlabhq` be imported via UI

See merge request !1013
Update cahngelog

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
follow curl redirects

Update `curl` commands to follow redirects (see
http://curl.haxx.se/docs/manpage.html#-L). Current `curl` commands will
return unexpected results if the requested content has been moved and is
returning information about where it has been moved to. Including the
`-L` option tells `curl` to follow the redirect so the file can be
correctly acquired.
Separate accept MR settings from manual merge instructions. Remove confusing `click here` links

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Merge branch 'mr-accept-widget' into 'master'

Improve MR accept widget

* fixes UX problem with 2 confusing `click here` links.
* separate Accept MR block from manual merge instructions

See merge request !1014