Dephasing of Quantum Bits by a Quasi-Static Mesoscopic Environment