An IT project that ran into difficulties has cost Scotland's public sector pension body millions and set its planning back significantly, says the spending watchdog.