Heat kernel estimates on glued spaces