Backflow correlations for the electron gas and metallic hydrogen