The terrorist who shot 13 people dead at Baku Oil Academy in Azerbaijan took his own life after the attack.