Parametrize Triangular on matrix type 

and some minor update of Triangular functionality. This should also address #7050 

cc:@dmbates, @jiahao