Fast computation of the rank profile matrix and the generalized Bruhat decomposition. (November 2017)