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

NumberFormat is not threadsafe
This is a local variable, right? It's not shared with other threads. It is already creating a new instance for each call. Or if you argue it could be the same instance -- a `ThreadLocal` wouldn't help. But it really can't be a singleton.