[libc++] Refactor basic_string::__recommend (#162631)

This does a couple of things:
- code that is only useful for `shrink_to_fit` is moved into that
function
- `shrink_to_fit` is simplified a bit
- `__recommend` is renamed to better reflect what the function actually
does
- `__allocate_long_buffer` asserts that the passed capacity doesn't fit
into the SSO

NOKEYCHECK=True
GitOrigin-RevId: e95c5c85113066fbf14307e31a533fdb1a7387ef
1 file changed