Hide this/other/both legend if only one pipeline_instance is shown.
Add tests for permissions enforcement in collections.provenance.

refs #2037
refs #1977
Move can_read permission logic into ArvadosModel.readable_by scope,
and use that in collections.provenance instead of plain where().

refs #1977
refs #2037
Merge branch '1977-provenance-report'