Make the management of pinentry.pin more explicit.
* pinentry/pinentry.c: Include <assert.h>. (pinentry): Set pin_len to 0. (pinentry_setbufferlen): If len is less than 2048, set it to 2048. Add an assertion. (pinentry_setbuffer_clear): New function that releases the pin buffer. (pinentry_setbuffer_init): New function that initializes the pin buffer. (cmd_getpin): Use pinentry_setbuffer_init and pinentry_setbuffer_clear instead of manual memory management. (cmd_confirm): Use pinentry_setbuffer_clear instead of manual memory management.