Added alternative imagick library implementation for the image handling.

Improved memory management for the GD library image handling.
Merge branch 'master' into gh-pages