use X-parents to align MMRNumbers, MMRTexts and PercentRepeatCounters

MultiMeasureRestNumber, MultiMeasureRestText and PercentRepeatCounter
are spanners (the grobs they are attached to are spanners as well, and
can be broken over barlines, so these three also must be spanners).

Until now their horizontal alignment was calculated quite unusually:
they were centered on Y-parents (MultiMeasureRest and PercentRepeat,
respectively). What's unusual about this is that it would make sense
to use X-parents for horizontal alignment - set MMRNumber's X-parent
to MMR and simply align horizontally on X-parent.  That's how the
alignment is specified now.

This makes x_centered_on_y_parent obsolete - it will be removed.

This commit shouldn't change anything in Lily behaviour.
Remove x_centered_on_y_parent from Self_alignment_interface.

This method was only used for aligning PercentRepeatCounters
and MMR stuff, but previous commit changed how they are aligned,
so this function shoul be no longer necessary.

This commit shouldn't change anything in Lily behaviour.

QUESTION:
Should this commit be merged with previous one?
Self_alignment_interface: introduce align_grob (issue 3239).

Right now align_grob is just a more generic version of
aligned_on_parent, but it will eventually replace all other
methods from Self_alignment_interface (hence a generic name).
In particular, aligned_on_self is a subset of align_grob.

Other changes to alignment interface will follow this one:
 - allowing different alignment for grob and its parent,
 - removing other callbacks (centered_on_foo etc.),
 - cleanup of grob definitions (define-grobs.scm etc.),
 - ...

All changes are internal and not visible to the user - offset
callbacks should continue to work exactly the same as before.
There should be no changes in Lily behaviour from this commit.
If a grob's parent is a PaperColumn, align using NoteColumn extent.

This makes unassociated lyrics behave consistently with
associated lyrics.

Until now, unassociated lyrics (lyrics without an
associatedVoice) were all left-aligned (more precisely:
their X-offset was 0). Changing self-alignment-X didn't have
any effect on them. This was because X-parent of an
unassociated LyricText is a PaperColumn, and
aligned_on_parent didn't know how to handle that.

This patch tells aligned_on_parent to use the extent of
respective NoteColumn as the parent extent needed for grob
alignment. Additionally to fixing unassociated lyrics
behaviour, this should allow correctly aligning_on_parent
other grobs, such as DynamicTexts.

Expected changes in regtests: all lyrics should now be
centered by default. This affects 11 regtests.

See also 3 commits later.
Allow separate alignment "factors" for me and parent.

TODO: reword commit message? description seems contrived.

Until now, alignment interface only allowed to align
"matching" points of a grob and its parent - for example
align left edge of an object with left edge of its parent,
align grob's center with its parent's center etc.

This commit makes it possible to align arbitrarily chosen
point of a grob with arbitrarily chosen point of its parent,
for example align LyricText's left edge with the right edge
of its parent NoteHead.

This commit shouldn't change anything in Lily behaviour.
Calculate dynamics alignment in a sane, configurable way.

Until now, DynamicText alignment was a mess:

The correct way to align a grob is to assign an appropriate
callback to the grob's offset property; LilyPond should
evaluate that callback and use its return value as grob's
offset when calculating its position.  Default settings
should be specified in define-grobs.scm; users should be
able to override them by assigning another procedure (or
a number) to that property.

DynamicTexts, however, didn't conform to this standard: one
part of alignment was in define-grobs.scm, and another one
on the C++ level: Dynamic_engraver and New_dynamic_engraver
applied set_center_parent on all DynamicTexts they created.
This way, regardless of what X-offset property was set to,
half a NoteHead width was always added to it.

This commit deletes calls to set_center_parent; DynamicText's
alignment is now defined in one place, with no hard-coded
C++ stuff.

This commit shouldn't change anything in Lily behaviour.

See also next commit, which does the same for Fingerings.
Calculate fingerings alignment in a sane, configurable way.

There's no need to align fingerings using set_align_self and
set_center_parent when xy_align_grob can do the job better.

Previous approach had at least two drawbacks:

 - users couldn't reliably override fingering's X-offset,
   because no matter what they set it to, set_align_self
   and set_center_parent added their return values to that,

 - changing self-alignment-X didn't work as expected; for
   example value LEFT didn't result in left edge of the
   fingering being aligned with left edge of the note.
   (using set_center_parent meant that parent's center
   was hard-coded ss the alignment point).

This commit shouldn't change anything in Lily behaviour.

See also previous commit.
Remove add_offset_callback, set_center_parent and set_align_self.

set_center_parent and set_align_self were two callbacks that
added the return value of, respectively, centered_on_xy_parent
and xy_aligned_on_self to the previous value of grob's offset.

As can be seen in previous two commits, it's a bad idea to
add something to offset properties unconditionally; user
should always be able to override offset to whatever he
wants, without having to struggle with a stubborn function
that keeps modifying his work.

This commit shouldn't change anything in Lily behaviour.
Remove special case in DynamicText alignment.

DynamicTexts living in a Dynamics context aren't attached to
specific NoteHeads (their X-parents are PaperColumns). Because
of that, they used a different offset callback than "regular"
DynamicTexts, but this is no longer necessary - since commit
<blahbbblah> (which solved issue 3254), aligned_on_parent can
correctly align grobs with PaperColumn parents.

In some cases slight differencies (up to 1/4 NoteHead width)
between old and new DynamicText placement are expected - this
is caused by different iplementation of an algorithm that
calculates NoteColumn horizontal center.

See also next commit.
Remove centered_on_note_columns from Self_alignment_interface.

This method was only used for aligning DynamicTexts in
Dynamics context, but previous commit took care of that,
so this is no longer necessary.

This commit shouldn't change anything in Lily behaviour.

QUESTION:
Should this commit be merged with previous one?
Use align-grob in define-grobs.scm: AccidentalSuggestion

See also other commits in this branch.
Use align-grob in define-grobs.scm: AmbitusLine

TODO: Apparently there is something wrong with AmbitusLine,
because a warning "AmbitusLine has empty extent and non-empty
stencil" pops out.  Obviously, AmbitusLine's stencil isn't
empty, because there's a line to be printed.  It seems that
LilyPond fails to set appropriate extent, which should be
automatically calculated from the stencil.

See also other commits in this branch.
Use align-grob in define-grobs.scm: GridLine

See also other commits in this branch.
Use align-grob in define-grobs.scm: MultiMeasureRest stuff

See also other commits in this branch.
Use align-grob in define-grobs.scm: OctavateEight

See also other commits in this branch.
Use align-grob in define-grobs.scm: PercentRepeatCounter

See also other commits in this branch.
Use align-grob in define-grobs.scm: Script

See also other commits in this branch.
Use align-grob in define-grobs.scm: StemTremolo

See also other commits in this branch.
Remove centered_on_._parent from Self_alignment_interface.

These functions were replaced with align_grob and are now
obsolete.

TODO: write convert-ly rule.
Use align-grob in define-grobs.scm: BarNumber

See also other commits in this branch.