Quarter of Welsh trains out of service, TfW admits in apology