Add wordwrap implementation to pinentry. Use mbstring directly as UTF-8 is defined in the protocol.
Start and stop gpg-agent if using GnuPG > 2.x. Specify our custom pinentry program and pass GPG_AGENT_INFO to environment of gpg process.
Add replacements for Engine, PinEntry and pinentry-cli to PEAR build script. Add requirement on mbstring.