Todoist, a popular to-do list app, has apologised after it said millions of users had their information accessed.