Release menu graph references before closing

Fixes the logo not being painted occasionally on closing media when
madvr is used.