cpp/capi.cpp: fix ImageProvider leak

GoImageProvider had a memory leak where it got a pointer to a QImage,
and never freed it. Qt already has a refcounting system in place so every
QImage is actually a pointer to pixel data, but it relies on the destructor
for every QImage instance to be called.
Merge pull request #88 from cookieo9/memfix

Fix ImageProvider data leak in C++ logic.

Fix by Carlos Castillo.