Merge pull request #13 from notaz/master

WOG fixes+sound support, random fixes
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 looping correctly