A homophobic tweet by former NSW One Nation leader Mark Latham unleashed an “utterly hateful torrent of abuse and vitriol”, including death threats against Independent Sydney MP Alex Greenwich, which left him fearing for his safety, a court has heard.