St. Paul city attorney resigns to run for county post