Extended Triangular Method: A Generalized Algorithm for Contradiction Separation Based Automated Deduction