who was the last president to serve in the revolutionary war