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

Reverts mapnik/node-mapnik#351