Runtime test to reproduce threadpool+ProcessExit issue

Do make test-process-exit to run
Fixes threadpool+ProcessExit problem

The threadpool was being shutdown too early, before the ProcessExit event was fired.
This led to bugs such as NLog not shutting down
(http://nlog-project.org/2011/10/30/using-nlog-with-mono.html).
Swap the condition -- instead of checking for OS X and assuming anything else uses the Linux behavior, check for Linux and let other platforms use the default POSIX behavior. This allows sigaltstack to be used on BSD variants.
This change has been tested (with the standard test suite) on FreeBSD 9.1 (i386, amd64) and Ubuntu 12.04.1 (i386).
Remove #ifdefs so ss_flags is always set to zero.

Removed the #ifdefs which used a different value for 'ss_flags' on Linux.
According to the POSIX standard, the SS_ONSTACK flag can never be used as input to the 'sigaltstack' function -- it can only be set by the 'sigaltstack' function itself, and tested after the function returns.
Fix serialization of DateTime struct for MS compatibility

Microsoft uses the UInt64 for the serialized dateData field.
Microsoft also uses Convert.ToUInt64 to convert the serialized
value to UInt64, which results in an overflow exception when
deserializing a DateTime serialized by mono.

Suggested change may break compatibility with previous versions
of mono, but should work with the Microsoft implementation.
UTF8Decoder.GetChars(Byte[], Int32, Int32, Char[], Int32, Boolean) can write past end of char[]. Fixes Bug#10788

UTF8Decoder.GetChars(Byte[], Int32, Int32, Char[], Int32, Boolean) eventually calls into UTF8Encoding.InternalGetChars, which does not perform any bounds checking on the passed in char* until after the first byte > 0x80 is encountered. For instance:

byte[] bytes = new byte[4096];
char[] chars = new char[10];
int charactersWritten = System.Text.Encoding.UTF8.GetDecoder().GetChars(bytes,
0, 4096, chars, 9, false);

will result in no errors and charactersWritten = 4096.
Update Path.cs

Fixed Path.GetDirectoryName() bug when path is in the following form: 'C:filename'
Implement a fast version of mono_get_lmf_addr () on ARM by inlining the call to pthread_getspecific () into the managed to native wrappers.
When serializing floats and doubles, use the InvariantCulture, so that floats are always stored in Json format, not the locale-specific format;   As reported on irc
Added tests to PathTest.cs
Merge pull request #579 from LogosBible/bug10788

UTF8Decoder.GetChars(Byte[], Int32, Int32, Char[], Int32, Boolean) can w...
Merge pull request #581 from TalAloni/master

System.IO.Path bugfix
Make x64 compilation work out of the box

Change the default projects that are compiled for x64
Merge pull request #583 from TalAloni/master

Make x64 compilation work out of the box
System.Text.Decoder throws ArgumentOutOfRangeException when it should not. Fixes Bug #10789

Similar to previously reported bug #6404, according to the documentation at http://msdn.microsoft.com/en-us/library/h6w985hz.aspx, System.Text.Encoder throws ArgumentOutOfRangeExceptions when it should not. From the documentation, an ArgumentOutOfRangeException should be thrown when:

charIndex, charCount, byteIndex, or byteCount is less than zero.
-or-
The length of chars - charIndex is less than charCount.
-or-
The length of bytes - byteIndex is less than byteCount.

To reproduce, run the following code:

int charsUsed, bytesUsed;
bool completed;
byte[] bytes = new byte[4096];
char[] chars = new char[4096];
System.Text.Encoding.UTF8.GetDecoder().Convert(bytes, 0, 0, chars, 4096, 0, false, out bytesUsed, out charsUsed, out completed);

Expected:

The code runs, charsUsed equals zero, bytesUsed equals zero and completed is true.

Actual:

Mono throws an ArgumentOutOfRangeException for charIndex.

There are also other behavioral differences between Mono and Microsoft's implementation for the GetChars(Byte[], Int32, Int32, Char[], Int32, Boolean) method, such as:

byte[] bytes = new byte[4096];
char[] chars = new char[10];
int charactersWritten = System.Text.Encoding.UTF8.GetDecoder().GetChars(bytes, 0, 0, chars, 10, false);

On Mono, this results in an ArgumentOutOfRangeException for charIndex, where for Microsoft charactersWritten = 0.

Similarly:

byte[] bytes = new byte[4096];
char[] chars = new char[10];
int charactersWritten = System.Text.Encoding.UTF8.GetDecoder().GetChars(bytes, 0, 4096, chars, 10, false);

On Mono, this results in the same ArgumentOutOfRangeException for charIndex, where Microsoft throws and ArgumentException. since "chars does not have enough capacity from charIndex to the end of the array to accommodate the resulting characters."
Merge pull request #584 from LogosBible/bug10789-resubmit

System.Text.Decoder throws ArgumentOutOfRangeException when it should no...
Fix for bug 10233 about Socket.BeginSendFile
Tests update for mobile profile
Fix ReadOnlyDictionary public api
Fix object::GetType when remoting is enabled.