Social function of the state: history and modernity (formation and civilizational aspects)