The Australian state of New South Wales is preparing to introduce legislation that gives local councils the power to "name and shame" companies that violate food safety laws.