From Kubrick’s rebellious computer to a perky gal-pal in Klara and the Sun, can cinema’s enduring fascination with AI tell us ...