Single-Wavelength and Multiwavelength Q-Switched Fiber Laser Using Fe3O4 Nanoparticles