A 16-year-old boy has been charged over an alleged online threat towards a mosque in south-west Sydney.