[anim] more robust attribute animation for undo

When the user stepped too fast in attribute (e.g., color) animation,
the undo was then resetting to intermediate values.
Now it finishes the animation before saving the value.
[anim] clean-up seemingly useless line + add comment
[anim] rewritten viewBoxAs with the same improvements as with attribute animation
[anim] refactor only: moved animPlay and animPause
[anim] better handling of SVG elements (no more known problems...)