A fire-ravaged container ship began to sink off the western coast of Sri Lanka on Wednesday, increasing the likelihood that oil and dangerous goods will leak into the ocean and exacerbate what is already one of the worst environmental crises in the countrys history.