Nested stochastic block model for simultaneously clustering networks and nodes