when was thomas jefferson the third president of the united states?