add new sql stored procedure

This postgresql stored procedure marks a dataset as deleted
truly obey deleted data sets and do not include them in checks
mark data sets which return a 404 error as deleted
if a http-head call doesn't succeed, retry with a http-get call