JZ: Initial commit for #684
JZ: Add altitude & Accuracy to GPS field
JZ: Commits for #684, #693, #695

Search and shrink multi column gps info to a single geopoint field to sort #684
Parse csv header for spaces to sort #693
Reject non utf-8 csv uploads to sort #695
JZ: Fix flake8 fail
JZ: CSVimport refactors. Detail in commit msg body

Sorts out the issues highlighted at:-
    https://github.com/onaio/onadata/pull/689/files#r20629961

Detail

 - Inflate slash-namespace field names ('x/y/z/1/2/3') to
dicts using reduce() to handle multiple levels.
 - Handle geopoint field creation before inflating slash-namespaced
fields to avoid working on "doomed" keys.
 - Use location fieldname prefix for geopoint tag even if it is
still dot-notated.
UK: add failing test for nested geopaths e.g demo/location.latitude
JZ: Fix failing test `test_nested_geo_paths_csv`

The test failed in the previous commit when we passed a `location_data`
dict with missing keys to `str.format()`.
To address this, I used `collections.defaultdict` to return empty
strings for missing key-values.
However, `str.format()` doesn't like seem to play ball with defaultdict
so I went the old school % operator which works well.

After solving that, I found that for for nested row dicts some sort
of traversal would need to be done to locate the appropriate nested
dicts where the geopoint field should be inserted. This was sorted
with the help of `reduce()`
JZ: Initial commit for #684
JZ: Add altitude & Accuracy to GPS field
JZ: Commits for #684, #693, #695

Search and shrink multi column gps info to a single geopoint field to sort #684
Parse csv header for spaces to sort #693
Reject non utf-8 csv uploads to sort #695
JZ: Fix flake8 fail
JZ: CSVimport refactors. Detail in commit msg body

Sorts out the issues highlighted at:-
    https://github.com/onaio/onadata/pull/689/files#r20629961

Detail

 - Inflate slash-namespace field names ('x/y/z/1/2/3') to
dicts using reduce() to handle multiple levels.
 - Handle geopoint field creation before inflating slash-namespaced
fields to avoid working on "doomed" keys.
 - Use location fieldname prefix for geopoint tag even if it is
still dot-notated.
UK: add failing test for nested geopaths e.g demo/location.latitude
JZ: Fix failing test `test_nested_geo_paths_csv`

The test failed in the previous commit when we passed a `location_data`
dict with missing keys to `str.format()`.
To address this, I used `collections.defaultdict` to return empty
strings for missing key-values.
However, `str.format()` doesn't like seem to play ball with defaultdict
so I went the old school % operator which works well.

After solving that, I found that for for nested row dicts some sort
of traversal would need to be done to locate the appropriate nested
dicts where the geopoint field should be inserted. This was sorted
with the help of `reduce()`
Merge branch '684_CSV_Imports_handle_latitude_and_longitude_as_gps_field' of github.com:onaio/onadata into 684_CSV_Imports_handle_latitude_and_longitude_as_gps_field
JZ: Fix geopoint field creation for non-nested csv
JZ: Perform deep merge when inflating pathkeys

Previous commit used dict `dict.update()` which does not preserve
the dict tree or nested dicts for "pathkeys" with the same root name

So we now create a recursive merge method to sort that out
JZ:Add geopoint field by merge row & location_data
ME: added TempToken model
ME: added migration file for TempToken model