plug-ins: multi-layer support in PSD load/export.
- Store the Layer ID (lyid) block. Use GIMP's layer tattoo as a PSD layer ID, hence mirroring PSD load processing (we were already reading this block into our layer tattoos but always exporting with no ID). - Add support for the Layer Selection ID(s) block (0x042D) both on import and export in order to store and restore the multi-layer selection. We were previously using the Layer state information block (0x0400) to store the active layer, but it doesn't seem to be usable for multiple layer selection. Actually it is even doubtful if this was working fine even for single layer selection but I can't be sure (I could only test in non-Photoshop software available to me). So the new logics is: * If more than 1 layer is selected, store only the Layer Selection ID(s) block. * If exactly 1 layer is selected, store both the Layer Selection ID(s) and Layer state information blocks. * Otherwise (no layers selected) do not store any of these blocks.