Reduce duplicate code in parse_*_time functions

parse_rfc1123_time and parse_iso_time_ call tor_timegm which duplicates most of the range checks - attached diff attempts to correct this.

Trac:
Username: icanhasaccount