Fix xcf closing Krita in case of parsing errors
Before if xcf import plugin encountered any problems
it closed Krita (using exit() function call) without
any consideration what's going on outside of xcf.
This commit disables closing/crashing Krita by xcf
and provides base error handling.
There are still assert()s in the code, so xcf still
can close it immediately, so it will need to be fixed.
Also there are still parts of the code that needs to be
revisited and checked to be sure that in case of incorrect
file xcf will return an error and won't try to parse it any
further (which would most probably cause another crash,
this time caused by eg. SEGFAULT).
After this commit, xcf tests should pass and xcf files
should be opened correctly, as before.