what is the dates of terms served in office for andrew johnson?