Hooks: Use binary search for looking up functions

This requires a qsort() at initialization time, but makes function
lookups cheaper (especially when a function is not hooked).

We could even get rid of the qsort() by sorting the array of hooks
at or before compile-time (we don't add new hooks at runtime yet).
fully implement string length handling

previous code may read too much and crash
map more keys
slight tuning for multitouch emulation

with this it doesn't interfere with SuperHexagon's L/R controls
openframeworks: basic support for SH leaderboards

uses pandora's c4a infrastucture
always log linker errors

with this users will know what libraries they are missing
emulate gl lib load over dlopen()

we don't want to load real GL libs because they have heavy dependencies
to 3D driver, making them happy is needless complexity and we wrap all
GL functions anyway, so just make dlopen() on GL libs always work.
rm GL sofiles, no longer needed
hook dir* functions

anything that may set errno must be hooked
(bionic's errno writes corrupt glibc state, as it happens for marmalade)
map all APKs to memory if possible

This allows reading assets directly from APK if they are stored
uncompressed (which is common), without need to extract files.
Was already used by WOG, will be used by PvZ in next patch.
marmalade: implement audio
wog: handle sound looping correctly
Merge pull request #15 from notaz/master

various fixes and marmalade audio
bump revision to .17
unlink libraries on exit
removes temporarily extracted libs
additionaly store game_name in ResourceStrings
also dont overwrite already defined app_name/game_name values
Better debug message for my_glCreateShader and my_glGetShaderInfoLog.
Merge branch 'upstream/master'

Conflicts:
	apkenv.c
	apkenv.h
	apklib/apklib.c
	apklib/apklib.h