Prison chiefs admitted 19,000 prisoners are still held in cells which do not meet legal fire safety standards