Fast formation of isogeometric Galerkin matrices by weighted quadrature