A homological approach to singular reduction in deformation quantization