Move the diff complexity icon into its own view.

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.