Save and load the collapse state of layer groups to PSD files

This is simply the code from !1797, without the part about alpha inheritance and with slightly cleaned up whitespace changes.

Test file generated in Photoshop: test_collapse_group_from_ps.psd

Example result when opening a psd file with some collapsed groups:

master PR
Screenshot_20260913_011305 Screenshot_20260913_011219

Merge request reports

Loading
Loading