Plug a few memory leaks

&hellip;and fix indent along the way.

[Diff without whitespace](https://github.com/fontforge/fontforge/pull/1499/files)

r? @JoesCat