Implement a flat file persistent node cache                                                                      
                                                                                                  
This implements a flat file persistent node cache for slim mode. It replaces the use of pgsql for node caching.
It stores lat / lon pairs in a large monolithic file ordered by osm id. This allows access to nodes in O(1). Assuming a dense
use of osm_id's (for the full planet this is currently at ~80%), this is the most efficient way to represent the data.

The planet_osm_nodes table with indexes currently takes about 100GB for the full planet. In contrast the flat persistent node
cache file is < 16GB. This should allow the disk caches to be more efficient. Furthermore, each read will load in more useful data.
Both aspects should reduce the number of seeks necessary on disk to retrieve node information.

Therefore hopefully this method should be faster (although I don't yet have benchmarks for this) than storing the data in pgsql.
Particularly diff imports may benefit, as during diff imports typically a low hit rate on the ram cache is achieved.

As the density of valid nodes in the osm id range reduces, e.g. due to only importing extracts, the effectivness of this
method quickly reduces. Therefore it is not well suited for extracts.



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28513 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
Use async IO in persistent_cache_nodes_get_list

Issue multiple IO requests for all of the blocks in the node list simultaniously (via async IO).
This should speed up processing as higher queue depths improve throughput.

This uses the GNU C library aio functions. In its current implementation of the library, this is not
"true" async IO at the kernel level, but instead the library implements a thread pool to handle multiple
simultanious requests.



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28514 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
Add a little utility program to inspect the flat-node-cache file.

It is a stand alone program that allows to query lat / lon values by
osm node id.

It currently isn't built with the make file and for the moment needs to be compiled by hand.



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28515 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] unchecked memory allocation leading to segmentationfault

Some large memory allocations weren't checked for failed allocation. This could lead to segmentation
faults if the system ran out of memory. Instead exit the program gracefully and give some additional
suggestions to the user how to fix the problem.

This closes #4497



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28527 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
[osm2pgsql] Fail configure if c++ compiler not found

The configure script was checking for a c++ compiler, but did not fail if none was found.
This then resulted failures later on in the configure script, giving missleading error messages.

This closes #4462



git-svn-id: http://svn.openstreetmap.org/applications/utils/export/osm2pgsql@28528 b9d5c4c9-76e1-0310-9c85-f3177eceb1e4
Disable async I/O for node persistent cache with multiple processes

For some reason async I/O was not correctly working with multiple processes.
It claimed that some of the I/O requests did never correctly complete and dead locked.

It is some interaction between the aio library and multiple processes.
Make node-persistent-cache-reader by default

Add a testing mode to node-persistent-cache-reader, that benchmarks access speed to the node-persistent-cache