A complex set of legal and political hurdles stand in the way of San Francisco achieving its public power plans.