Cache the profiles when loading layers
When loading an image with a reasonable amount of layers, loading
and creating the profile for each layer isn't really noticable, but
if there are thousands and thousands of layers, it's a major drag
on loading kra files.
And it's very likely that every layer has the same profile _anyway_.
This makes loading the sample files from https://bugs.kde.org/show_bug.cgi?id=411532
mucht faster.
BUG:411532