Functionally referential and intentional communication in the domestic dog: effects of spatial and social contexts