Method and device for phase modulation of a carrierwave and application to the detection of multi-level phase-encoded digital signals