Australia will pay Nauru hundreds of millions of dollars to accept non-citizens who don't have a valid visa as part of a new deal to deport them.