Harmonic Functions on Trees and Buildings