XypicDiagramDrawer: Test the class instead of doing debugging output.

Because many things were prone to abrupt changes before, there were no
real tests, only debugging output.
XypicDiagramDrawer: Place the labels of boundary morphisms on the outer side.

This commit makes XypicDiagramDrawer place the labels of those morphisms
which form the visual boundary of the diagram on the outer side.  This
commit also fixes the tests.  No explanation of the approach is
currently provided, though.  This will be done in the next commit.
XypicDiagramDrawer: Describe how outer diagonal morphisms are detected.

This commit adds a comment which explains the functionality added in the
previous commit.
XypicDiagramDrawer: Add the possibility to mask morphisms.

This commit adds the possibility to instruct XypicDiagramDrawer.draw to
not include certain morphisms in the visual representation of the
diagram.
XypicDiagramDrawer: Handle multiple morphisms between the same two objects.

XypicDiagramDrawer is now able to deal with the situation when there is
more than one morphism between the same two objects.  These morphisms
are drawn curved.  Nothing is done to decide which direction of curving
would be more efficient; this is thus an opportunity for further
optimisation.

The test this commit adds also shows that, because of multiple curved
morphisms, the diagram may become rather crowded.  This is easily
overcome by increasing row and column spacing of the diagram in the
Xy-pic output.
XypicDiagramDrawer: Draw loop morphisms.

This commit adds the possibility to draw loop morphisms.
XypicDiagramDrawer attempts to detect the best way to place such a loop
morphism such that intersects as few other morphisms as possible.
XypicDiagramDrawer: Don't push out the labels of loop morphisms.

This does not make much sense because the code that typesets curved
morphisms takes care to have their labels inside the loops.
_StrArrow: Don't store the looping format directly.

Previously the looping format string was set directly in the morphism
processing function.  This commit moves the production of the actual
loop formatting string to _StrArrow.  This makes it possible to retrieve
the information about the starting and ending points of the loop later.
XypicDiagramDrawer: Slightly handle multiple loop morphisms per object.

Unfortunately, I have not yet managed to change the radius of the curve
of the loop morphisms, which will make loop morphisms look rather ugly
on crowded diagram.  This morphism attempts to reduce the clutter by
counting loop morphisms as occupying the corresponding quadrants as
well.
XypicDiagramDrawer: Allow to specify the format of the diagram.

The method draw now includes an argument diagram_format which holds the
string that is inserted between '\xymatrix' and '{'.  This string should
be the usual Xy-pic diagram format.  No additional layer of abstraction
is provided here in order to keep things simple and flexible.
_StrArrow: Turn this class into the public ArrowStringDescription.

In the coming commits XypicDiagramDrawer will be endowed with the
possibility to use user provide arrow formatters.  In this context,
ArrowStringDescription will provide the means of interaction between
custom formatters and XypicDiagramDrawer.
XypicDiagramDrawer: Don't lose morphisms properties.

Previously, when sorting the morphisms, the method draw would overwrite
the original dictionary mapping morphisms to their properties with a
sorted list of morphisms.  This commit fixes this issue.
XypicDiagramDrawer: Add support for arrow formatters.

Arrow formatters are functions which get an ArrowStringDescription as
arguments and modify the fields in this structure.  The test added in
this commit shows how to achieve that.
XypicDiagramDrawer: Add default arrow formatter.

The default arrow formmatter is applied to every arrow independently of
the arrow properties.  This can be used to adjust the visual aspect of all
arrows.
Add xypic_draw_diagram.

This function provides a shortcut for DiagramGrid and
XypicDiagramDrawer.
Add preview_diagram.

This function combines xypic_draw_diagram and
sympy.printing.preview, which makes it possible to plot diagrams
directly in a SymPy interactive console.
Expand the relevant docstrings.

This commit adds proper docstrings to ArrowStringDescription and
XypicDiagramDrawer.  It also adds some examples for xypic_draw_diagram.
categories.rst: Reference the new drawing classes.

This commits makes categories.rst pull in the docstrings of the new
classes.
Don't compare to None, use "is None" instead.