The UK government is drawing up a strategy to protect its remaining oil refineries from rising carbon prices, after two sites closed.