The oldest parts of Northern Ireland's main prison, which was opened just 17 years ago at a cost of £40 million, are "unsafe and unsatisfactory" and should be replaced as soon as possible.