Jamaica's Kamina Johnson Smith suffered a narrow defeat in her bid to become the Commonwealth Secretary General.