Seol mar théacs é seo: Kazhdan and Haagerup properties from the median viewpoint