use File.open( .., 'w') instead of File.write so it works in --1.8 mode
Use JRuby finalization rather than deleteOnExit for Tempfile.

Fixes #1905.
Merge remote-tracking branch 'origin/jruby-1_7'

Conflicts:
	core/src/main/java/org/jruby/ext/tempfile/Tempfile.java
Actually honor passed-in mode for IO#reopen. Porting oops.

This commit also makes the spec run better in MRI...using full
path in the temp file name caused it to exceed maximum path length
in MRI.
Fix spec to pass under MRI 2.1, which also makes it pass in JRuby.
Simplify "lost ivar writes" spec to be simpler, more reliable.
Fix thread-safety of constant caching in IR runtime.

This gets the spec for #999 working.
Raise proper errno in IO#sysread if possible.
Clean up JRUBY-3155 spec.
Disable spec that hangs in MRI too. See #1909.
IO#sysread should block regardless of nonblocking status.
Use MRI lib for open3, deprecate our hidden impls.

We provided IO.popen3 and popen4 previously because open3.rb used
forking. Now that it uses spawn, which is fully supported in 9k,
we can go back to the regular open3.rb. This provides better
compatibility with MRI.

popen4 will be removed. It was never officially available for
users, and it can be achieved by using Open3 and getting the pid
off the IO objects.

The internal implementations of popen3/4 also tried to unwrap the
subprocess's streams from java.lang.Process. This is broken on
Java 7+ because Process logic now eagerly attempts to drain the
child streams in a separate thread, making the unwrapped inner
stream/channel useless. Because 9k currently only supports Java
7+, and because the internal popen3/4 are now deprecated and
unused, I have removed this wrapping.
Exclude spec failing on Linux for now. #1910.
[Truffle] Pass the method we are calling as an argument so we can get it from the call stack.
[Truffle] Limit size of megamorphic method cache and stop warning about it.
[Truffle] Make slow path send print a big warning.
[Truffle] Use proper dispatch for some method missing corner cases.
[Truffle] Move the proc that can be created from symbols into a specific node.
[Truffle] Fast patch dispatch for procs created from symbols.
[Truffle] Fix #inspect on true and false.