Fix leaks in the frame utils.
Write hidden frame tests against leaks.
Merge pull request #875 from Gozala/bug/panel-leaks@847771

Bug 847771 - Fix memory leaks and add tests r=@erikvold