[TensorRT] query GPU properties only once when setting device_id (#19092)
### Description
For most models this does not show significant overhead but for very
small models it shows significant impact.
Attached screenshot shows impact when only using 2 FC layers:
