Range selection ending fix

Removed time signature from selection if not followed by chordrest in selection.
Fixed range box to not include bar lines and time signatures if not followed by a chordrest.
Please add a comment before, see all other functions in this file. Explain what the function is really doing. Especially the (s->tick() >= tick() + actualTicks())
Also it needs space after while, after if etc... 

Last thing... I'm not a big fan of the while (true), and multiple return in the function.

What about something like this?

```
Segment* ss = segment();
for (Segment* s = ss; s && (s->tick() < tick() + actualTicks());) {
s = s->next1MM(types);
}
return s;
```