Direct Solutions of Sparse Network Equations by Optimally Ordered Triangular Factorization