Local authorities are investing more than 6% of their assets in oil and gas and some investment managers could find themselves on shaky legal ground as the threat of a carbon bubble puts pensions at risk