If government takes a transitional stake in Grangemouth’s oil refinery until the plant can develop the greener jobs of the future, it could be kept open