what did thomas jefferson serve under john adams?