Nearly £2.5 million has been paid out in compensation by ScotRail since the operator was nationalised, figures have shown.