Welsh primary school attendance has improved, with new data showing a drop in the number of pupils missing school.