[SPARK-3241][SQL] create NumberFormat instance by threadsafe way