Text this: Kazhdan and Haagerup properties from the median viewpoint