A Saudi court has sentenced a Sri Lankan migrant worker to death over a Facebook comment that was deemed blasphemous.