Fix drawing of self-loops with edge markers
Improve mid_marker placement with bezier curves

This also includes a "mid_marker_pos" edge attribute which allows a
relative placement of the mid marker along the edge.