Crystal-chemical controls on rare-earth element concentrations in fossil biogenic apatites and implications for paleoenvironmental reconstructions