Rewrite jsval_to_str and introduce jsval_to_domstring.