Afif was an inmate in a high-security Indonesian jail when he transformed from aspiring radical Islamist to soldier for Islamic State, ready to sacrifice his life for a group based thousands of miles away in the Middle East.