Cherednik Algebras for Algebraic Curves