How electricity became a metaphor for modernity in the United States, inspiring authors from Mark Twain to Ralph Ellison.