The cost of replacing one of Scotland's major prisons has quadrupled - while its opening has been delayed by at least five years despite warnings going back nearly three decades about overcrowding, it can be revealed.