Avoid error when second level grouping is applied but first level grouping is not
Decompile second level grouping adjustments, preserve at least one reporting to root


Disclaimer: The specification is kind of weird
updates changelog 4887
Merge pull request #974 from opf/fix/timelines-second-level-grouping-4887

Fix/timelines second level grouping 4887
[#8449] Fix errors mentioned by JSHint

https://github.com/opf/openproject/pull/1405