frontend: Fix possible memory leaks in lakka, rgui, and rmenu