The build system needed fixes because the tools paths changed and one tool that
we used (apkbuilder) was removed entirely. Recent NDKs don't ship gcc 4.4.3
anymore, therefore switch to 4.6. The code itself needed a fix for a jni
reference bug that was uncovered by KitKat.
The port now builds with latest sdk (r22) and ndk (r9d).
Change-Id: Id74fa54ba93bbb0ee30373fbe79e92c5ff03201d