Fix bugs in _basic_string_rep_clone() and _basic_string_rep_reduce_shared().