A contentious plan to keep Australians safer online is poised to become law following months of negotiations between the government and minor parties.