Anharmonicity and the isotope effect in superconducting lithium at high pressures: A first-principles approach