New laws which allow the Northern Territory police commissioner to declare snap curfews have passed in parliament.