Fix minor issues with refactoring of retrieval code
Fix minor issues with refactoring of retrieval code

The retrieval code was refactored for greater performance
https://github.com/e-mission/e-mission-phone/commit/f3ea875f28fd865d6c740d5c14929e50b2eb693b

However, this introduced some minor regressions.
https://github.com/e-mission/e-mission-docs/issues/679#issuecomment-944929186

which were caused due to incorrect parameter passing and resulting "undefined" values.
https://github.com/e-mission/e-mission-docs/issues/679#issuecomment-944957477

Testing done: while reading data for 4th August
----

we detect that the pipeline has finished running

```
INFO:Selected date is :1470294000000
getting pipeline complete timestamp
DEBUG:complete_ts = 1470951950.271(Thu Aug 11 2016 14:45:50 GMT-0700) end of current day = 1470380399(Thu Aug 04 2016 23:59:59 GMT-0700) retVal = true
Returning 1470951950.271,true
```

we only read entries after `1470951950.271 = 2016-08-11T21:45:50.271000+00:00`

```
getRawEntries: about to get pushGetJSON for the timestamp
About to return message {"key_list":["manual/mode_confirm"],"start_time":1470951950.271,"end_time":1634403476,"key_time":"metadata.write_ts"}
getRawEntries: about to get pushGetJSON for the timestamp
About to return message {"key_list":["manual/purpose_confirm"],"start_time":1470951950.271,"end_time":1634403476,"key_time":"metadata.write_ts"}
```

we got a fair number of unprocessed inputs, mainly because we only filled in the inputs way after the pipeline

```
About to show 'Reading from server'
DEBUG:About to dedup localResult = 0remoteResult = 52
DEBUG:Deduped list = 52
DEBUG:About to dedup localResult = 0remoteResult = 55
DEBUG:Deduped list = 55
unprocessed manual inputs  52 MODE, 55 PURPOSE
```

And we only processed trips from the 4th.

```
DEBUG:while reading data for 1470294000000 from server, got nTrips = 9
About to hide 'Reading from server'
Finished hiding ionicLoading, returning list of size 9
Reading trips from server finished successfully with length 9 completeStatus = true
trip count = 9, calling processTripsForDay
About to show 'Processing trips'
0:2016-08-04T10:03:51.235000-10:00, 1880.7650001049042
1:2016-08-04T10:41:32.136385-10:00, 8056.584614753723
2:2016-08-04T13:10:38.739684-10:00, 605.260315656662
3:2016-08-04T13:40:36.959000-10:00, 135.75
4:2016-08-04T13:46:26.561801-10:00, 745.4381992816925
5:2016-08-04T14:06:52.592000-10:00, 280.5680000782013
6:2016-08-04T14:18:35.840464-10:00, 936.7305357456207
7:2016-08-04T14:39:38.288795-10:00, 5956.420205116272
8:2016-08-04T16:34:45.744782-10:00, 232.60321807861328

Processing trip starting at 2016-08-04T13:10:38.739684-10:00 {data: {…}, start_place: {…}, style: ƒ, onEachFeature: ƒ, pointToLayer: ƒ, …}
Processing trip starting at 2016-08-04T13:40:36.959000-10:00 {data: {…}, start_place: {…}, style: ƒ, onEachFeature: ƒ, pointToLayer: ƒ, …}
Processing trip starting at 2016-08-04T13:46:26.561801-10:00 {data: {…}, start_place: {…}, style: ƒ, onEachFeature: ƒ, pointToLayer: ƒ, …}
Processing trip starting at 2016-08-04T14:06:52.592000-10:00 {data: {…}, start_place: {…}, style: ƒ, onEachFeature: ƒ, pointToLayer: ƒ, …}
Processing trip starting at 2016-08-04T14:18:35.840464-10:00 {data: {…}, start_place: {…}, style: ƒ, onEachFeature: ƒ, pointToLayer: ƒ, …}
Processing trip starting at 2016-08-04T14:39:38.288795-10:00 {data: {…}, start_place: {…}, style: ƒ, onEachFeature: ƒ, pointToLayer: ƒ, …}
Processing trip starting at 2016-08-04T16:34:45.744782-10:00 {data: {…}, start_place: {…}, style: ƒ, onEachFeature: ƒ, pointToLayer: ƒ, …}
About to hide 'Processing trips'
```

e-mission/e-mission-phone,e-mission/e-mission-phone,shankari/e-mission-phone,shankari/e-mission-phone,e-mission/e-mission-phone,shankari/e-mission-phone,e-mission/e-mission-phone,shankari/e-mission-phone