Australia blocked the sale of the country's biggest electricity network, Ausgrid, to foreign companies, citing national interest grounds.