Newton-Krylov Methods in Power Flow and Contingency Analysis