The influence of an obstacle on flow and pollutant dispersion in neutral and stable boundary layers