unbreak interaction of realloc and free_sized

Previous realloc implementation had somewhat "aggressive" logic of
avoiding shrinking for reallocs up to half of the original size. It
also had logic of "padding up" small realloc growths to at least 1.25x
of original size.

Neither of those behaviors is compatible with free_sized. I.e. when
size hint is passed and used, we're expecting size hint to match
actually used size class. If realloc kept the "old" chunk in up to 2x
larger size class, clearly the hint won't match, which would cause
hard to debug crashes.

As part of the change we also clean up windows behavior of realloc-ing
memory that was allocated by pre-patched runtime. Not that we expect
this to actually happen, but since we have the code, lets give it a
chance to work. We also add test coverage for this case. Kudos to
Gemini for spotting the issue with my original attempt.
4 files changed