Lithium adsorption on MgO(100) and its defects: Charge transfer, structure, and energetics