Moments Of Characteristic Polynomials Of Random Matrices And L-Functions Over Function Fields