miniobject: fix ref count leaks in tests