Britain's Shell posted stronger-than-expected quarterly profit as the Iran war sent fossil fuel prices soaring.