postgresql: Fix get_snapshot_branches return value for empty search
When searching for branches in an existing snapshot, a PartialBranches
object must be returned regardless the number of found branches.
None
should only be returned when a snapshot does not exist.
This fixes an inconsistency between the postgresql and cassandra backends.
This will also fix that webapp reported issue.
Related to #3413
Migrated from D6283 (view on Phabricator)