Passively Q-Switched and Mode-Locked Fiber Laser Based on an ReS2 Saturable Absorber