The Australian government has agreed to compensate almost 2000 asylum seekers and refugees held at its offshore prison camp on Manus Island.