Renormalization group flows and quantum phase transitions: fidelity versus entanglement