Constrained fractional set programs and their application in local clustering and community detection