Terriko/cynara geolocation

@xuzhang As promised, the more-generic version of the cynara checks for geolocation patch.

- This needs more extensive testing with a geolocation-capable device, but I don't have one available to me.

[edit: removing things that have been resolved in latest commit]
int ret = // let's use C++ style