Fix remaining 1.9 String#% RubySpec by making "%u" an alias of "%d"

Also fix two other failing RubySpecs for Kernel#sprintf that were
affected by the change.
Add RubySpec for Kernel#sprintf and the "%d" format
Fix a race condition when going GC dependent

This is a fun one. The problem is here that a thread goes GC dependent.
This means it's going to access GC managed memory etc. and doesn't allow
GC anymore. For this it checks whether it needs to stop or not. If it
doesn't have to stop, it increments the thread count and continues.

What happens here is that when it checks should_stop, the value is still
false. After this check another thread will set thread_stop and check
how much pending threads there are. This happens before the other thread
increases the count, which leads to the thread wanting to GC thinking
it's ok to GC and the other thread thinking it's ok to continue.

This never really shows up normally, because of the timing of course and
the fact that in the next checkpoint the thread that originally
continued now sees a GC is requested and will halt. So the way this bug
shows itself, is usually the following.

When the thread thinks it can continue it will setup a new call frame
and store some references, for example a local. This however means that
when the GC walks the call frames, it might be too late, so this new
call frame isn't actually scanned by the GC. So this means the bug shows
itself as for example a local variable that isn't properly forwarded by
the GC.

This is also the reason that setting the call frame properly was also a
first suspect (and actually there were cases where that logic was
missing), but the deeper issue was also this race condition causing the
problem to occur less often but not entirely disappear with the changes
to the call frames.

Race conditions... When found they seem so obvious, when looking it
takes days...
Merge pull request #2265 from leocassarani/sprinter-19-ints

Make "%u" an alias of "%d" on 1.9
Use the correct number of arguments for OnStack
rb_io_wait_writable should actually wait for writable fd's

This was calling select() with a readable fd set, but of course it needs
to use a writable fd set.

Fixes #2251
Allow paths separated with PATH_SEPARATOR for include, lib and opt dir

Fixes #2264
Only setup exception from thread for joining when we have to

This makes it less prone to race conditions, because we only setup the
exception for use in Thread#join if we don't raise it directly because
of Thread.abort_on_exception. This ensures the exception doesn't get
raised twice due to race conditions.

We ensure the working by either setting up the @exception object before
marking the thread as not alive anymore, or delay raising the exception
into the main thread if we have shut down everything properly for this
thread.

Fixes #2259
Fix race condition in Thread spec
Use dirty object setup for String.from_codepoint