Brazilian mining company Samarco has agreed to a $366 million damage bill after its tailings dam burst, spreading toxic waste over hundreds of kilometres, killing 10 people, and flattening entire villages.