Fix ambitus layout

 Fix layout of ambitus elements with accidentals.

Ambitus elements with and without accidental(s) are laid out misaligned: each element is left-aligned to its left-most part, note head or accidental indifferently.

The new algorithm aligns the leftmost note heads of each ambitus and places accidentals 'hanging' on the left accordingly.

Other small improvements:
- improved management of accidental collision by 'undercutting' flats;
- corrected detection of octave shifts and transpositions in updateRange();
- reduced left margin for ambitus with accidentals.