Prior to this commit, this looked up only the latest visit information.
This now looks up across multiple visits up (from most recent visit to the
oldest) until one visit which match the criteria is elected.
Note: this also rename appropriately the tests defined in test_origin.py so we
can trigger them by name tagging.
This will also resolve appropriately the algos.snapshot.snapshot_get_latest
function (which uses this function underneath).