A drone for the first time has been deployed to rescue swimmers that got into trouble off an Australian beach.