Geometric invariant theory for polarized curves