Update to database.updateLatestPosition call timing.

This change updates the TrackerEventHandler class to trigger the updateLatestPosition query only after all records received instead of on each record insert. The query will also have access to the same position data as a normal record insert as well as the last inserted record ID.