Fix #6107 : bar lines and brackets disappearing when some of the staff they span is hidden

Fixed by analyzing brackets and bar line spans rather than only relying on start and stop staff Y offset (which is not set if the staff is not shown).

Note: there are still issues with measure numbers, but these belong more to system items than to bar lining.
Add test
Merge pull request #604 from mgavioli/Fix_6107_Barlines_with_hidden_staves

Fix #6107 : bar lines and brackets with hidden staves