Fix #27201 - PLUGINS: methods returning pntrs to QObject lead to crash.

For details, including an analysis of the problem, see http://musescore.org/en/node/27201

This fix only covers `Q_INVOKABLE` methods in the `Note` class; there are probably more of them on other classes.
Fix typos
Fixes the following Q_INVOKABLE methods returning a QObject* by turning them into a property:

- Measure:
-- firstSegment
-- lastSegment
- MeasureBase:
-- nextMeasure
-- nextMeasureMM (new)
-- prevMeasure
-- prevMeasureMM (new)
- Score:
-- firstMeasure
-- firstMeasureMM (new)
-- (for firstSegment(), see special cases below)
-- lastMeasure
-- lastMeasureMM (new)
-- lastSegment

- Segment:
-- next (renamed from `next1`)
-- nextInMeasure (renamed from `next`)
-- prev (renamed from `prev1`)
-- prevInMeasure (renamed from prev)

Special cases:

- Cursor: The prototype of the `Q_INVOKABLE Ms::Note* Cursor::addNote(int pitch)` was wrong: corrected in `Q_INVOKABLE void Cursor::addNote(int pitch)`.
- QmlPlugin: `Q_INVOKABLE Score* QmlPlugin::readScore()` and `Q_INVOKABLE Score* QmlPlugin::newScore()` has been kept, as they are intended to be called from QML; code has been added to ensure the C++ ownership of the returned object.
- Score: `Q_INVOKABLE Segment* Score::firstSegment(Segment::Type segType)` is kept (as it needs a parameters), but code is added to ensure C++ ownership of the returned Segment*.
- Segment: `Ms::Element* Segment::element(int track)` has been made NOT Q_INVOKABLE; a variant `Q_INVOKABLE Ms::Element* elementAt(int track)` has been added specifically for QML with code to ensure the C++ ownership of the returned Element* (this was the cause for the crash of the Walk plug-in).
- FiguredBass: `Q_INVOKABLE Ms::FiguredBassItem* FiguredBass::addItem()` has been removed; plugin interface for FiguredBass needs to be redesigned anyway.

The few occurrences in the supplied plug-ins of the methods whose names did change have been updated.
An overlooked details...
Fixed handling of empty beats in Guitar Pro versions 5 and below so that we create invisible rests instead of empty segments
Fixed #24243.

The problem was that the canvas was ajusting its position using the
segment, but the segment starts from the first staff.
Fix: find the first element in the selection and set the canvas
     position there
	modified:   libmscore/paste.cpp

Fixed coding style.
	modified:   libmscore/paste.cpp
Changed tremolo clone
Changed two-note tremolo copy-paste.
Fix for paste of 2 note tremolo that will not fit into bar.
Added tests for 2 note tremolo copy paste
Merge pull request #1031 from jpirie/empty-segment-fixes

Turning empty segments in Guitar Pro 5 and below into rests
Merge pull request #1028 from mgavioli/Fix_27201_Plugin_methods_returning_QObjects

Fix #27201 - PLUGINS: methods returning pntrs to QObject lead to crash.
Merge pull request #1030 from BartlomiejLewandowski/2-note-tremolo-copy-paste

2 note tremolo copy paste
Merge pull request #1027 from andreituicu/fix_24243

Fixed #24243.
Added SelectionWindow class.
Added selection filter class.
Added selection filter object to score.
Added communication between selection window and selection filter.
Added example filtering for dynamics.
Added updating of selection window when switching scores in musescore.
Added filterRange method for copied segment list.
Method only works for dynamics.
Added const modifiers.
Added function that sets selection filters.
Added test suite for selection filter.
Added compare and save mime data function in testutils.
Added test for dynamic filtering.