Rename "elements" to "segments".

This is in line with the SVG specification, which uses the same naming.
The element.cmd is now called segment.type, also in accordance with the
spec.
Remove unnused "drawCommand" function.