Graph diffusions and matrix functions: Fast algorithms and localization results