Cherry pick fixes from upstream

Includes:

be48e390962413258d9c310fbf226759c1229f78 Report direction and vertical speed with Geoclue plugin.
57b8f6a38f121ad5cd7bf3dd911ef61cca7a0bfb Attempt to fix crash in tile cache.