Diffs with a large number of changed lines time out (504 HTTP error) or
generate a HTML page that's so heavy web browsers struggle with it.
https://github.com/gitlabhq/gitlabhq/pull/5014 introduced limits on
commit line count so that only a safe portion is rendered. This was
later undone by code refactoring in be5b6db8, e0eb4803 and c741fcab.
This patch re-introduces a safe limit on number of lines.
Having a merge request with a comments on a line which is then changed
in a later commit prevented new comments from properly showing up in the
merge request show page.
* `Note#set_diff` do not use stored the diff when creating a new note
in merge requests (we can not be sure the diff did not changed since
the last comment on that line)
* Do not rely just on `outdated?` of the first note when displaying
comments of a MR in the discussion tab, but partition the
active/outdated notes and display them all
* In the inline changes tab just select the active notes, so an
outdated note does not prevent an active one from being rendered
* Just show active comments in the side-by-side changes tab
* return edit/close buttons to old position (right of title)
* make 'Issue #1' header smaller
* move mr commits to separate tab
* change inline/side diff switcher to buttons from tabs
* make issue sidebar start with dicsussion block
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>