curses: Reset tty state on failed dialog creation.
* pinentry/pinentry-curses.c (dialog_run): Cleanup on dialog_create error.
This may happen due to a too small tty. We need to cleanup in this
case to keep the tty in a usable state.
- GnuPG-bug-id: T1383