moving distance calculation from controller.js to gpx.js to get through all track points only once
adding a spinner to get user waiting for the import process to finish