A Japanese journalist captured in Afghanistan told the world he was still alive by tweeting with a prison guard’s cellphone.