str: Replace ss_alloc_substring() by ss_clone() and similarly with a pool.