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

NumberFormat is not threadsafe