President Donald Trump’s reported rift with Australia's leader over a deal to resettle refugees has shone a spotlight on the country's controversial program which sees thousands of migrants kept offshore on detention islands.