The state assemblyman’s social-media storytelling has earned him an unexpected place in the popular imagination. How does his persona fit into the lineage of historical and fictional New York figures?