str: optimize `with_capacity`

before:

test bench_with_capacity ... bench: 104 ns/iter (+/- 4)

after:

test bench_with_capacity ... bench: 56 ns/iter (+/- 1)
move `strdup_uniq` lang item to std::str

also makes it private, since it's an implementation detail