Disable / hide MR edit blob button if cannot edit.

UI changes on the merge request diff view:

- if the user does not have permission to edit the blob, disable the link
- if the blob is not text, hide the link

This is the same behavior as for the blob show edit button. Both buttons have been factored out.

The blob show edit button is unchanged.

Before this, there would be a clickable link to a 404 or to edit binary files as text on the page.

Screenshot of disabled Edit link:

![screenshot from 2014-09-28 11 00 53 disable edit mr after](https://cloud.githubusercontent.com/assets/1429315/4433779/97c20602-46ee-11e4-8d7b-8e1c85a6416f.png)

This solves half of: https://github.com/gitlabhq/gitlabhq/issues/7310

Mmm I don't see a conceptually clean cut on this.

Personally, I don't like the "Perceived complexity" rule: the only way I get clean method cuts is when I notice that there is some duplication. If I try to cut before, I usually cut it wrong, so I'd rather organize really complex methods with comments and empty lines. But of course, I try to follow the projects guidelines.