A man guilty of murdering nine people, most of whom had posted suicidal thoughts on social media, has been executed in Japan.