Factor out common code to socrata-thirdparty-utils