v43: Register native methods more safely

The previously used function calls abort() if some methods cannot
be found. We just want to stop loading Xposed in this case to avoid
bootloops.
v44: Several performance improvements

The main change is that the original method is now saved in insns.
This does not only save a lookup, but we can also save additional
information with it. We save the Method object (to avoid creating a
new one every time) and an arbitrary object (which is filled with
references to callbacks, return type and parameter types by XposedBridge.

We also do the lookup of the Object class just once.

Requires changes in XposedBridge to work.
Implement invokeOriginalMethodNative as internal native function, no JNI
Convert xposedCallHandler to non-JNI native as well

Thanks to this, we no longer need to manage thread status and reference
tracking ourself, which is faster and more stable.
Merge branch 'upstream'
Pass-through the pointer to the original method

This avoids that we need to convert the reflection object back to the
methodId that we already know in xposedCallHandler(). This saves another
microsecond on my phone.
Enforce using the Dalvik runtime library

As ART is not supported (yet?), disable it when Xposed is active to
avoid bootloops.
v45
v46: Fixed a potential crash in the replaceAsm function

When the patched function address is the tail of memory page, the
patched code touches two pages. so we must make the two pages writable.

Fixes #3.
correct function declaration
v47: Don't use inlined dvmSetObjectArrayElement() function

This function accesses ArrayObject->contents directly. However, it
seems that some vendors change this struct, leading to different
offsets between compile time and runtime. Due to this, the array
elements are written to the wrong place.

With this fix, Xposed determines the offset by comparing pointers
returned from official JNI functions and provides its own function
to set array elements, based on said offset.

It would be much easier to use the non-inlined version of the
dvmSetObjectArrayElement() function, but it isn't exported by
libdvm.so on all ROMs.
Merge branch 'upstream'

Conflicts:
	xposed.cpp
	xposed.h
	xposed_offsets.h
conver to object directly