Support posix-spawn gem if it is available to provide much faster spawing for applications with large heaps.

Ensure that IO streams in the spawn method are closed.

Fix bug in exporting LANG variable in non-Windows processes.