add a version of rallocx taking old and used sizes

This is a cleaned up version of #152, down to ~30 additional lines of code (excluding tests). It fits in well with `sdallocx` and the implementation is now *very* simple. It's significantly less convenient than `rallocx`, but the complexity is completely acceptable in a generic string / vector implementation since it only needs to be called a few times and the data structures will then be reused countless times.

It's very useful in any string / vector implementation using geometric growth for reserving space and concatenation due to the slack space at the end. Sized deallocation is a nice opportunistic optimization since data structures have the information already, and the used size also provides a small improvement for arrays of very large types due to size class rounding.