Add ldshared(xx) to ./configure
Use LDSHARED configuration from ./configure everywhere

We had multiple places where we setup LDSHARED, this unifies them into
./configure and reuses the settings in other places such as Daedalus and
the extension builder helper.
Bump ./configure version
Export LDSHAREDXX

Fixes #2177
Add specs for rb_sprintf
Add rb_sprintf to the C-API

This adds a copy of vsnprintf.c from MRI, which is already a copy of an
open source implementation of this functionality. The copy retains the
original copyright message from that implementation.

Fixes #2178