Anatomical origin and computational role of diversity in the response properties of cortical neurons