Thousands of newly-retired people have not been paid their state pension owing to a backlog.