tests: Add test for an owned boxed struct passed in a callback

https://bugzilla.gnome.org/show_bug.cgi?id=722899