improve test code and fix a potential bug in fmpz_poly_mat_mul_KS (no known failure though)