Element partitioning between metallic liquid, silicate liquid, and lower-mantle minerals: implications for core formation of the Earth