fix layout issues with offset chords & notes

This PR replaces https://github.com/musescore/MuseScore/pull/921.  Somehow, the git history got messed up.

This PR addresses a number of related layout issues, mostly having to do with elements attached to chords/notes that are offset from the segment origin.  These offsets may have occurred as a result of user action, collisions between voices, because the chord is smaller or larger than nominal, etc.  The changes are mostly localized in Chord::layoutPitched() and computeMinWidth() / layoutX() (code duplicated in both functions).

Specific fixes include:

- accidental stack now moves with chord user offset
- accidental no longer moves after load if attached to note with user offset
- moving a chord no longer results in spurious added space elsewhere in measure
- lyrics under offset notes now space correctly
- arpeggios on offset chords now avoid collision with other chords in segment
- chordlines and hooks on offset chords now avoid collision with chords in other segments
- spacing of grace notes now responds to ST_minNoteDistance
- spacing between grace notes and whole notes made consistent
- spacing of grace notes with ledger lines made consistent