purge all references to pth lib, gnupg only uses npth now
standardize build-stamp usage in external/Makefile

This is an attempt at making build dependencies work better, so that it
doesn't rebuild everything every time.
set min platform to android-9/2.3/Gingerbread

Its currently too much work for us to handle supporting older versions.
This relies on a lot of new APIs both in the SDK, like the Contacts
handling, and in the NDK.

Update target to the latest while I'm at it.
bump version to 0.3 code 4
include all CPU-specific JNI build folders
make compile error whenever there is a security issue with formats

-Wformat -Werror=format-security
add Posix.symlink() for making symlinks with needing `ln -s`

We have no guarantee that `ln -s` will be included in all Android distros,
but since most provide `ln -s`, I think we can be resonably sure that the
libc everywhere will include symlink().

Its also really a pain to run shell commands in Java for simple things like
this.
more reliable integration of Android NDK build files into external/Makefile

Now the build target for SDK, NDK, and external/Makefile are all set from
AndroidManifest.xml.

refs #1630
use NDK gcc 4.8 compiler, required NDK r9b or newer
`make gitclean` should not delete files that are committed into git
add Android support commit to m4/libtool.m4 on any project that uses it

This required some hacks since libassuan, libgpg-error, and npth didn't work
with just adding the m4/libtool.m4 to them.  They include some custom versions
of the autotools files, so those got blown away by using autoreconf.

refs #1548
sed hack to force libtool update for libgpg-error

For whatever reason, the libgpg-error autotools customizations where
especially troublesome.  So I just wrote some sed patterns to replace the
necessary things in libgpg-error/libtool.  libtool is just a generated shell
script after all...

refs #1548
install libs built Android-style into libs/$(APP_ABI)/ instead of assets/

This means that Android handles the rest for us, including bundling and
unpacking them from the APK, setting the LD_LIBRARY_PATH, etc.

refs #1548
load GnuPG libs needed by JNI via standard Android path

Now that the core libs are included in the standard Android way, we can
load the libs in the standard Android way. libgpg-error, libassuan, libgpgme,
and libpinentry are all needed by JNI stuff, so they are loaded in Java
space.  (libgcrypt and libkbsa are needed by things like gpg-agent, so they
don't need to be loaded into Java).

refs #1548
remove manual entry for libs/, its included automatically
gnupg-for-java: POSIX setenv() to change app's env vars, which GnuPG requires

This allows GPG to set the env vars at app launch, and everything should
magically get the env. There are two things that require setting env vars:

* Android's linker can only find shared libs by looking in LD_LIBRARY_PATH,
  so in order for the GnuPG command line tools to find the required shared
  libraries, LD_LIBRARY_PATH needs to include the apps lib paths also.

* GnuPG needs env vars like GNUPGHOME to find the folder where keyrings,
  UNIX sockets, and config files are kept.

http://stackoverflow.com/questions/318239/how-do-i-set-environment-variables-from-java

refs #1548
add Posix.setenv() for setting the global env vars of an app

Turns out that Android/Dalvik is much simpler than Java in this regard.  The
environment is quite directly linked into the dalvik process, while in Java,
changing the environment requires a bunch of reflection trickery because it
maintains the environment in a special way in the JVM process.

refs #1548
include full android env vars in environment.conf for pinentry

There was a backtrace coming from when pinentry-android tries to open the
PinEntryActivity with /system/bin/am, this made that go away.

refs #2744

backtrace:

pinentry-android.c  D  sending intent with: exec /system/bin/am start -n info.guardianproject.gpg/info.guardianproject.gpg.pinentry.PinEntryActivity --activity-no-history --activity-clear-top --ei uid 10043 --user 0
pinentry-android.c  D  start_server /data/data/info.guardianproject.gpg/app_home/S.pinentry
    AndroidRuntime  D  >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
    AndroidRuntime  D  CheckJNI is OFF
          dalvikvm  D  Trying to load lib libjavacore.so 0x0
          dalvikvm  D  Added shared lib libjavacore.so 0x0
          dalvikvm  D  Trying to load lib libnativehelper.so 0x0
          dalvikvm  D  Added shared lib libnativehelper.so 0x0
       Environment  W  EXTERNAL_STORAGE undefined; falling back to default
          dalvikvm  W  Exception Ljava/lang/NullPointerException; thrown while initializing Landroid/os/Debug;
          dalvikvm  I  Exception thrown by dispatcher for 0x48454c4f
          dalvikvm  I  java.lang.ExceptionInInitializerError:
          dalvikvm  I  at android.ddm.DdmHandleHello.handleHELO(DdmHandleHello.java:140)
          dalvikvm  I  at android.ddm.DdmHandleHello.handleChunk(DdmHandleHello.java:86)
          dalvikvm  I  at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
          dalvikvm  I  at dalvik.system.NativeStart.run(Native Method)
          dalvikvm  I  Caused by:
          dalvikvm  I  java.lang.NullPointerException:
          dalvikvm  I  at java.io.File.fixSlashes(File.java:185)
          dalvikvm  I  at java.io.File.<init>(File.java:134)
          dalvikvm  I  at android.os.Environment.getLegacyExternalStorageDirectory(Environment.java:322)
          dalvikvm  I  at android.os.Debug.<clinit>(Debug.java:97)
          dalvikvm  I  at android.ddm.DdmHandleHello.handleHELO(DdmHandleHello.java:140)
          dalvikvm  I  at android.ddm.DdmHandleHello.handleChunk(DdmHandleHello.java:86)
          dalvikvm  I  at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
          dalvikvm  I  at dalvik.system.NativeStart.run(Native Method)
          dalvikvm  I  Rejecting re-init on previously-failed class Landroid/os/Debug; v=0x0
          dalvikvm  I  Exception thrown by dispatcher for 0x46454154
          dalvikvm  I  java.lang.NoClassDefFoundError: android/os/Debug
          dalvikvm  I  at android.ddm.DdmHandleHello.handleFEAT(DdmHandleHello.java:152)
          dalvikvm  I  at android.ddm.DdmHandleHello.handleChunk(DdmHandleHello.java:88)
          dalvikvm  I  at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
          dalvikvm  I  at dalvik.system.NativeStart.run(Native Method)
          dalvikvm  I  Rejecting re-init on previously-failed class Landroid/os/Debug; v=0x0
          dalvikvm  I  Exception thrown by dispatcher for 0x4d505251
          dalvikvm  I  java.lang.NoClassDefFoundError: android/os/Debug
          dalvikvm  I  at android.ddm.DdmHandleProfiling.handleMPRQ(DdmHandleProfiling.java:181)
          dalvikvm  I  at android.ddm.DdmHandleProfiling.handleChunk(DdmHandleProfiling.java:84)
          dalvikvm  I  at org.apache.harmony.dalvik.ddmc.DdmServer.dispatch(DdmServer.java:171)
          dalvikvm  I  at dalvik.system.NativeStart.run(Native Method)
hide comment field and make it optional when creating keys

The Comment: field is little understood and usually misused.  So hide it
and give a checkbox to enable it for people who actually want to use it.

http://debian-administration.org/users/dkg/weblog/97

closes #1960
Eclipse ADT insists on marking some things as exported in .classpath

Who knows what this does anyway?