Make more of osm2pgsql threading aware

This is the pull request for the "threading" branch. This patch makes the initial import of ways and relations multi-threaded. Given that on a fast machine (with SSDs) most of those phases can be CPU bound, moving things into a multi threading approach can speed these phases up significantly.