When no visit info (timestamp, id or snapshot) is provided to that function
return the last full visit with a valid snapshot or the last partial visit
with a valid snapshot otherwise.
This fixes a browsing issue when an origin is no more available but swh keeps
visiting it afterwards.
For instance the origin https://github.com/baifanwudi/PythonCode has been removed
since the first swh visit. Currently, when trying to browse it, we get
and [[ https://archive.softwareheritage.org/browse/origin/directory/?origin_url=https://github.com/baifanwudi/PythonCode | empty snapshot view ]].
After that change, the last full visit with non empty snapshot will be [[ http://localhost:5004/browse/origin/directory/?origin_url=https://github.com/baifanwudi/PythonCode×tamp=2016-03-28T00:32:18Z | displayed ]] instead.