Relaxation and frequency shifts induced by quasiparticles in superconducting qubits