[bug] Fix possible memory leaks

Fix wrong usage of realloc().
Found by VC's /analyze option.
Remove obsolete variables from win32/Makefile*

Patch files for Ruby 1.6.8/1.8.1 are obsolete.
Import the latest st.[ch] from Ruby r47675
Merge branch 'master' into ruby-2.x