Lensing by Kerr black holes. I. General lens equation and magnification formula