The Scottish Prison Service has apologised to the families of a woman and teenage boy who took their own lives at a young offenders' institution and has accepted all recommendations made in a damning report.