[KERNEL32][RTL] Diverse fixes/improvements for thread stack creation code. (#802)