Common rules underlying optogenetic and behavioral modulation of responses in multi-cell-type V1 circuits