Lawmakers in Australia's New South Wales have passed laws ending the right to silence when being questioned by police in an effort to combat gang violence.