Quaternion Method in Polarization Optics