handle internal vs external pinentry processes correctly
add comment warning about tight coupling
refactor all JNI code to be understandable and handle errors better
remove some debug spam and log errors to logcat insted of stderr
remove more debug messages and printing of sensitive info
authenticate the pinentry helper's uid using SO_PEERCRED

This should always succeed, and doesn't provide any assurance we're NOT
connected to a malicious pinentry, but we check it because we can.
If it does fail, something incredibly janky is going on.