US hands over Bagram prison to Afghans