what did thomas jefferson serve as under john adams?