Make libmonosgen-2.0.so a "mixed-ABI" native library

On a Samsung S3 (only), I am seeing some weird exceptions trying to post to the main thread from a dispatch thread. The code for the dispatch thread is at https://github.com/nirvanai/cirrus/blob/master/src/client/DispatchThread.cs

For the OnDispatch event handler, I've tried both a simple Android.OS.Handler.Post and Android.App.Activity.RunOnUiThread, both times supplying an Action delegate parameter.

Here are the exceptions I'm seeing:

* Assertion at /Users/builder/data/lanes/monodroid-mac-monodroid-4.2.5-branch/adcec4e0/source/mono/mono/metadata/monitor.c:528, condition `mon->nest == 1' not met
Stacktrace:

  at System.Threading.Monitor.TryEnter (object,int,bool&) <0x00053>
  at System.Threading.Monitor.Enter (object,bool&) <0x0001f>
  at Java.Lang.Object.GetObject (intptr,Android.Runtime.JniHandleOwnership,System.Type) <0x00083>
  at Java.Lang.Object._GetObject<T> (intptr,Android.Runtime.JniHandleOwnership) <0x0004f>
  at Java.Lang.Object.GetObject<T> (intptr,Android.Runtime.JniHandleOwnership) <0x0002b>
  at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) <0x00023>
  at (wrapper dynamic-method) object.18c9fc12-0a3f-4800-a5f2-1e6fee31555f (intptr,intptr) <0x0002b>
  at (wrapper native-to-managed) object.18c9fc12-0a3f-4800-a5f2-1e6fee31555f (intptr,intptr) <0xffffffff>

UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at System.Threading.Monitor.TryEnter (object,int,bool&) <0x00053>
at System.Threading.Monitor.Enter (object,bool&) <0x0001f>
at Java.Lang.Object.GetObject (intptr,Android.Runtime.JniHandleOwnership,System.Type) <0x00083>
at Java.Lang.Object._GetObject<Java.Lang.IRunnable> (intptr,Android.Runtime.JniHandleOwnership) <0x0004f>
at Java.Lang.Object.GetObject<Java.Lang.IRunnable> (intptr,Android.Runtime.JniHandleOwnership) <0x0002b>
at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) <0x00023>
at (wrapper dynamic-method) object.18c9fc12-0a3f-4800-a5f2-1e6fee31555f (intptr,intptr) <0x0002b>


And:


Error destroying handle 0x448 mutex due to 16
_wapi_handle_unref_full: Attempting to unref unused handle 0x448
Stacktrace:

  at System.Threading.Monitor.TryEnter (object,int,bool&) <0x00053>
  at System.Threading.Monitor.Enter (object,bool&) <0x0001f>
  at Java.Lang.Object.GetObject (intptr,Android.Runtime.JniHandleOwnership,System.Type) <0x00083>
  at Java.Lang.Object._GetObject<T> (intptr,Android.Runtime.JniHandleOwnership) <0x0004f>
  at Java.Lang.Object.GetObject<T> (intptr,Android.Runtime.JniHandleOwnership) <0x0002b>
  at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) <0x00023>
  at (wrapper dynamic-method) object.fa97596d-5765-4327-8d1e-f4cfac0f4890 (intptr,intptr) <0x0002b>
  at (wrapper native-to-managed) object.fa97596d-5765-4327-8d1e-f4cfac0f4890 (intptr,intptr) <0xffffffff>

UNHANDLED EXCEPTION: System.NullReferenceException: Object reference not set to an instance of an object
at System.Threading.Monitor.TryEnter (object,int,bool&) <0x00053>
at System.Threading.Monitor.Enter (object,bool&) <0x0001f>
at Java.Lang.Object.GetObject (intptr,Android.Runtime.JniHandleOwnership,System.Type) <0x00083>
at Java.Lang.Object._GetObject<Java.Lang.IRunnable> (intptr,Android.Runtime.JniHandleOwnership) <0x0004f>
at Java.Lang.Object.GetObject<Java.Lang.IRunnable> (intptr,Android.Runtime.JniHandleOwnership) <0x0002b>
at Java.Lang.IRunnableInvoker.n_Run (intptr,intptr) <0x00023>
at (wrapper dynamic-method) object.fa97596d-5765-4327-8d1e-f4cfac0f4890 (intptr,intptr) <0x0002b>

Unhandled Exception:
System.NullReferenceException: Object reference not set to an instance of an object

  at System.Threading.Monitor.TryEnter (System.Object obj, Int32 millisecondsTimeout, System.Boolean& lockTaken) [0x00000] in <filename unknown>:0 
  at System.Threading.Monitor.Enter (System.Object obj, System.Boolean& lockTaken) [0x00000] in <filename unknown>:0 
  at Java.Lang.Object.GetObject (IntPtr handle, JniHandleOwnership transfer, System.Type type) [0x00000] in <filename unknown>:0 
  at Java.Lang.Object._GetObject[IRunnable] (IntPtr handle, JniHandleOwnership transfer) [0x00000] in <filename unknown>:0 
  at Java.Lang.IRunnableInvoker.n_Run (IntPtr jnienv, IntPtr native__this) [0x00000] in <filename unknown>:0 
  at (wrapper dynamic-method) object:fa97596d-5765-4327-8d1e-f4cfac0f4890 (intptr,intptr)

Reference: https://bugzilla.xamarin.com/show_bug.cgi?id=7013