Remove db dependency in gpx

Instead of calling get_location function, pass the function as parameter.
Move insert tracksegment out of extractpoints function.
Split up extractpoints function

Move code for loading gpx file in separate function