Remove unused diagram argument, and s/fill_diagram/create_diagram/

The diagram argument to the fill_diagram() methods of MergeFrontier and
Block was never used, so remove it. Once removed, the fill_diagram()
name no longer makes much sense, since the diagram is created within
the method, and no longer passed in as an argument. Therefore, rename
the methods to create_diagram().

The docstrings of the two methods are adjusted accordingly.
Refactor to improve readability
Block: Split creation and formatting of diagram

Instead of passing formatting characters directly into
Block.create_diagram(), create the diagram using integer constants
to represent the semantic state of each node in the diagram.

Provide Block.format_diagram() for mapping the integer constants
onto a provided "legend", which provides the "graphical" (insofar
as ASCII-art can be considered such) representation of the various
states for each node in the diagram.

Also collapse Block._write() into Block.write(), since the latter
is equivalent to the former with default arguments passed.
MergeFrontier: Split creation and formatting of diagram

Instead of working directly with the formatting characters returned
from Block.format_diagram(), build on the semantic diagram returned
from Block.create_diagram(), and bitwise-or in additional constants
to represent the merge frontier semantically.

Then add MergeFrontier.format_diagram() to perform a similar mapping
of the semantic information into a "graphical" format. The end result
printed to the screen is identical across this refactoring.
Add ANSI coloring of diagram when outputting to terminal

Controlled with new diagram options --color and --no-color:

--no-color forces coloring off, else --color forces coloring on, else
we turn on coloring only if stdout is a tty.
Fix PPM output
Merge branch 'diagram-colors'

Add (optional) colors to the "git-imerge diagram" output.