Fix a warning in appdomain.c introduced by 76e8c8ba0f5dad4c154b9ab6dd969ef2eb0bec79.
Fix a C# compiler error in the runtime test suite.
Add a mono_binary_search () function.

This is a replacement for bsearch () because some platforms
have bogus asserts in their implementations.