An expert body says the closure of Scotland's only oil refinery was 'clearly foreseeable' but planning was inadequate.