Fix itoa_base re-entry problem and rename itoa_base to num_to_string