Allow using two different tables to hold dives and gps locations

This only changes the infrastructure and actually loses functionality as
it no longer does the simplistic "just treat the locations as dives and
merge them".

The new code that does something "smart" with the gps_location_table is
yet to be written. But now we can use the XML parser to put the gps
locations downloaded from the webservice into their own data structure.

In the process I noticed that we never used the two delete functions in
parse-xml.c and removed them.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Better algorithm to merge gps locations & locations names from webservice

This no longer abuses the dive merging code (which would leave stray
"dives" behind if a gps fix couldn't be merged with any of the dives) and
instead parses the gps fixes into a second table and then walks that table
and tries to find matching dives.

The code tries to be reasonably smart about this. If we have
auto-generated GPS fixes at regular intervals, we look for a fix that is
during a dive (that's likely when the boat where the phone is staying dry
is more or less above the diver having fun). And if we have named entries
(so the user typed in a location name) we try to match them in order to
the dives that happened "that day" (where "that day" is about 6h before
and after the timestamp of the gps fix).

This commit also renames dive_has_location() to dive_has_gps_location() as
the difference between if(!dive->location) and if(dives_has_location) is a
bit too subtle...

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
README: Update names of Debian packages for dependencies

Use libglib2.0-dev instead of glib-2.0 and add both libssl-dev and
libsoup2.4-dev.

Signed-off-by: Carl Worth <cworth@cworth.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Auto-generate C file dependencies, and make the build more quiet

This does some rough auto-generation of header file dependencies for all
the *.c files, rather than our file-by-file incomplete hardcoded ones.

It also stops showing the whole compile line, because it's ugly and
distracting.  Instead it just shows "CC file.c".  If you care about the
full thing, you still see them with "make -n".

Only tested on Linux.  It probably is missing some Windows or
OSX-specific header includes.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Hide the error output from pkg_config if you don't have osm-gps-map

This became very obvious after commit df6a9ddd8a21 ("Auto-generate C file
dependencies, and make the build more quiet") went in; since not having
osm-gps-map is one of the few errors that aren't fatal for building it
seemed worth quieting this down.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Merge branch 'integrate-from-webservice'

Bring in the better implementation of merging gps locations from the
webservice