Melting and wetting transitions in the three-state chiral clock model