State-resolved valence shell photoionization of Be-like ions: experiment and theory