MATES: Model-Aware Data Selection for Efficient Pretraining with Data Influence Models