Rabi oscillations, Ramsey fringes and spin echoes in an electrical circuit