Make PSD pixel data saving code be shared between KisImageData and KisLayerRecord
It also fixes a set of loading/saving bugs we had