Electric Dipole Polarizabilities of Lanthanides and Actinides