The Democratic Party’s advantage in party identification has widened over the past two decades, but the share of Americans who describe their political views as liberal, conservative or moderate has remained stable during the same period.