get osm2pgsql working again with threaded pending. more perf stuff to do