Dendroidal spaces and algebras over operads