The House Speaker won't seek another term in the role but will stay on in Congress.