Change SOVERSION only in case of ABI changes
Fix indentation and line endings
Always free resources before setting the error code

In case of error calls to function that free resources could
modify the error code shadowing errors.
Do not shadow the original error message that appears to be more informative
typo
Fixed a mirroring problem in epr_read_band_annotation_data