Frequency converters, spectral inverters and switches based on four-wave mixing in semiconductor optical amplifiers