* Add map reference point constants `*_MAP_REF_POINTS `that can be used
for map projections
* Add (unimplemented )`*_project` and `*_sample` methods to the `Maps`
implementation
* Add `PollenSample` and `UviSample` structs
* Make `Position::new` const
* Add `is_*_stale` methods to the `MapRefresh` trait
* Only update the maps of a type if `retrieve_image` yielded something
or if the maps are stale
* Also only then bump the timestamp for the map type
This means if there is nothing in the cache, it will retry each refresh
to get something because the timestamp is not bumped until there is
something. Once there are maps, it will only update it and bump the
timestamp if there is an image, that or, it has become stale and it
can be set to `None` and we end up in the initial state.
This calculates which offset to use in the maps series with respect to
the instant of caching. It assumes the first map is current for the
instant it was retrieved.
* Rename `*_first` to `*_at` methods
* For convenience, change the types of `*_MAP_COUNT` to `u32`
* Introduce `*_MAP_INTERVAL` constants to indicate the number of
seconds each map in the series applies to
* Return `None` if the provided instant is too far in the future
This makes the response time way more snappy when the maps thread
is updating its cache.
* Move the `MapsHandle` type to the `maps` module
* SWitch to using the standard library mutex
* Split refresh methods into retrieval methods that don't need the lock
and check timestamp & update methods that only need it shortly
* Introduce the `MapsRefresh` trait and implement it for `MapsHandle`
* Reorder some methods for clarity
* Small documentation fixes
* Replace the lazy `once_cell` by a maps handle type
* Use Rocket's managed state to manage a handle
* Ensure that the handlers have access to it
* Pass another handle to the maps updater loop
* Try to keep the lock as short as possible
Still, long downloads block the lock. Add a FIXME to refactor this
so the lock is only taken when updating the maps fields.