On a resonant elliptic problem with singular terms