How ‘Booksmart’ went from a 2009 script collecting dust to this year’s must-see movie of the summer