Converting the region_constraint into a WKT polygon in commonlib, not in the engine

This is needed for https://github.com/gem/oq-engine/pull/1569.
The tests are green: https://ci.openquake.org/job/zdevel_oq-commonlib/158/