Fix loop out position and loop layout updates

Fix the loop out position when toggling the loop button for the first time (set the loop out position correctly to the end of the score).

Force an update of the loop cursors when changing view mode or dragging a staff.