A machine for producing inequalities involving immanants and other generalized matrix functions