Similar performance improvements to 807685d7.

Since QGraphicsTextItem aligns things differently than
QGraphicsSimpleTextItem, some adjustments to BeamGroup::createStaccato
and BeamGroup::createNoteFlag were need.