The continuum-of-urns scheme, generalized beta and Indian buffet processes, and hierarchies thereof