Software-Intensive Systems for Smart Cities: from Ensembles to Superorganisms