State officials plan to close three minimum-security prisons in the coming weeks to shore up staffing and improve safety at other prisons.