Communities of discourse: Ideology and social structure in the reformation, the enlightenment, and European socialism