Cluster algorithms for quantum impurity models and mesoscopic Kondo physics