Add support for images in User Notification.

Factor out Go to C image struct allocation.