I found estimates in the book Energetics of the Earth, John Verhoogen online: http://books.google.fr/books?id=yTsrAAAA...
It gives 5000 K as the core temperature now, and a 250 K cooling since the formation of the Solar System, 4.5 billion years ago. So we have quite some time to go.
The main factor slowing down the cooling is radioactive decay of long living atoms, namely Uranium-238, Uranium-235, Thorium-232, and Potassium-40, with half-lives of roughly 4.47 billion years, 704 million years, 14.1 billion years, and 1.28 billion years, respectively. From the half-lives of these isotopes and a comparison with the age of Earth, you can see that internal heat production via
radioactive decay will likely persist at near current levels for quite some time to come.
A solid core indeed would put an end to the Earth magnetic field.
- Moon leaving
The lunar ranging experiment using the reflectors left on the moon by the Apollo missions found that the Moon is spiralling away from Earth at a rate of 38 mm per year. This means it would take another 10 billion years to double the distance Earth-Moon
- Sun
The Sun has been increasing in brightness by about 30% in the last 4.5 billion years and will continue to do so. This means that in a billion years or so, the oceans will have evaporated.
- As for the humanity's destruction, the most dangerous are killer asteroids and supervolcanoes. The first are events that have frequencies of one per 100 millions years or so, the second once per million years.