do not delete scopes with same resource config id
do not delete scopes with same resource config id

There is a chance that we are deleting the same resource config scope
(meaning equal resource_id and resource_config_id) when there are
multiple FindOrCreateScope calls running at the same time. This is
because both calls can not find a resource scope for a resource_id and
resource_config_id, but then both try to create one by going into the
codepath that will first delete outdated scopes and then insert a new
one. Rather than deleting outdated scopes, the second run can end up
deleting the scope created by the first run and the first run ends up
using a scope that does not exist.

[#6274]

Signed-off-by: Clara Fu <42a85f9886a0622d00feeb55e338984483b45493@vmware.com>
Co-authored-by: Aidan Oldershaw <30ef7a6e0d016bc846f26d89dacbd23aceded206@pivotal.io>

concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse,concourse/concourse