Design, RF measurement, tuning, and high-power test of an X-band deflector for Soft X-ray Free Electron Lasers (SXFEL) at SINAP