inline some subroutines
shorten nmod_mat_det_mod_pk() code