Relativistic corrections to the quark-antiquark potential and the quarkonium spectrum