The beloved chocolate chip cookie was invented by accident.