An Equilibrium Model of Investment in Restructured Electricity Markets