Wettability of reservoir rock and fluid systems from complex resistivity measurements