Fix minor reference leaks in app_skel and TEST_FRAMEWORK