Add support for iOS + compression on writing

- compile on iOS
- can use RLE compression on writing
To reduce memory usage :
- layer images is read on demand (and not retained)
- layer images can be asked from a delegate when needed when writing