Analysis of the Detailed Configuration of Hydrated Lanthanoid(III) Ions in Aqueous Solution and Crystalline Salts by Using K- and L-3-Edge XANES Spectroscopy