Move the diff complexity icon into its own view.

Review Request #5492 — Created Feb. 17, 2014 and submitted — Latest diff uploaded

Information

Review Board
master
204dcba...

Reviewers

The logic for the diff complexity icon in the diff viewer is now its own
view, making it easier to reuse. It's also a bit smarter now, in that it
doesn't require a number of replaces or total lines to work (though
providing this information adds more detail to the icon).

With this comes a performance improvement. Previously, each icon was
calculating the necessary colors for itself, but now they're calculated
only the first time an icon is used, and cached for future icons.

Loaded the diff viewer and saw the icons.

Used the icon in another change, without all the information available
during diff rendering, and still saw a decent icon.