Frees an array of strings, as well as each string it contains.
If str_array is `NULL`, this function simply returns.
str_array
an array of strings to free