Linking total cross sections for hard and soft processes through analyticity in Q2 and sum rules