Fix MR commenting system when new commits pushed

This conmmit fixes wierd behaviour when you see wrong comments about new
commits in merge requests.

Short explanation of a bug:
When you push new commits to project we updated `project.merge_requests`
with comment about push. But `project.merge_requests` includes also
merge requests from forks to origin project. So when you push to master
branch it commented on all merge requests from forks to origin where
source_branch was `master`
Fix 500 error on diff if file permission changed
Increase unicorn timeout to 60 seconds
Prevent 500 error on search results if description contains relative link
Merge branch 'master' of github.com:gitlabhq/gitlabhq
Merge branch 'fix_git_access' into 'master'

Fix ref parsing in Gitlab::GitAccess

See merge request !1107
Merge branch 'fix-mr-commit-comment' into 'master'

Fix MR commenting system when new commits pushed

Fixes #1608

This conmmit fixes wierd behaviour when you see wrong comments about new
commits in merge requests.

Short explanation of a bug:
When you push new commits to project we updated `project.merge_requests`
with comment about push. But `project.merge_requests` includes also
merge requests from forks to origin project. So when you push to master
branch it commented on all merge requests from forks to origin where
source_branch was `master`

See merge request !1108
Merge branch 'fix-diff-500' into 'master'

Fix 500 when viewing diff if a file changed permission

Fixes #1613

See merge request !1109
Merge branch 'unicorn-timeout' into 'master'

Increase unicorn timeout

From 30 seconds to 60 seconds

Fixes #1579

See merge request !1110
Merge branch 'search-wiki-keyword' into 'master'

Prevent 500 error on search results if description contains relative link

Bug: If I add relative link to comment or description and search for it - I get 500 error on search page.

Reason for this is that we use `@repository` variable. But for pages like search it does not assigned.
In future we should avoid using such variables. Especially in markdown parser that can be used on different pages

Fixes #1601

See merge request !1111
Merge pull request #7793 from cirosantilli/replace-javascript

Replace javascript:; links with buttons.
Merge pull request #7795 from cirosantilli/factor-notes-css

Factor .add-diff-note active state.
Merge pull request #7317 from drpdigitalmedia/master

set the collation to utf8_general_ci
Merge pull request #7521 from hiroponz/fix-not-rendered-graph-edge

Fix not rendered the network graph edges
Merge branch 'api/improve-error-reporting' of https://github.com/jubianchi/gitlabhq into jubianchi-api/improve-error-reporting
Factor fork button view.
Factor current_url + URI.path into current_path.
Merge pull request #7833 from cirosantilli/wiki-cur-url

Factor current_url + URI.path into current_path.
Remove test line without effect because no should.
Add notice about weekend in release cycle.