Added default destructors for many objects.

This removes the need to call gp_xxx_unref(), but it's also now safe to
do so more than once. It's a fairly major change, so I've incremented
the minor version number.