Revert "use RAII to manage resources, simplify and remove malloc/free"
Merge pull request #359 from mapnik/revert-351-image_data

Revert "use RAII to manage resources, simplify and remove malloc/free"