In “The Uncanny Muse,” David Hajdu offers a lively survey of centuries of machines that have served as instruments of ...