Simple function to calculate Legendre-Gauss quadrature nodes and weights.
Based on https://www.mathworks.com/matlabcentral/fileexchange/4540-legendre-gauss-quadrature-weights-and-nodes?requestedDomain=www.mathworks.com implementation but twice as fast.