Fix layout of ambitus elements with accidentals.

Ambitus elements with accidental(s) are laid out misaligned with ambitus elements without accidental(s).

The new algorithm aligns the leftmost note heads of each ambitus and places accidentals accordingly.
Clean up code and correct octave detection in updateRange()
Fixes to ambitus:

- Fix missing adjustReadPos() for ambitus in Maesure::layoutX()

- Reduce left margin in there are accidentals
Merge pull request #824 from mgavioli/fix_ambitus_layout

Fix ambitus layout