Innovative programs make them safer while enhancing opportunities for success after release. Some states are showing the way.