qt: Ensure that malloced strings are free'd
* qt/main.cpp (qt_cmd_handler): Use unique_malloced_ptr for malloced strings. * qt/pinentrydialog.cpp (PinEntryDialog::generatePin, PinEntryDialog::checkConstraints): Use unique_malloced_ptr for malloced strings. * qt/util.h: New.
Introducing unique_malloced_ptr<T> simplifies managing malloced strings
by free'ing them automatically, when unique_malloced_ptr is destroyed.
Fixes a memory leak in PinEntryDialog::generatePin.
- GnuPG-bug-id: T5517