Improve typing of PathPainter

For reasons I don't really understand, this fixes a collision with Images.
But in principle, this is a better way to design types anyway (particularly
for an immutable). The only negative is that this requires both to be
the same type of AbstractVector (if you prefer, you could add an A and B type).