fixed uninitialized arrays that would cause random segfaults

Without setting to zeros the publishers and subscribers arrays, adding a new one (via e.g. advertise) would place it in the wrong position causing segfauilts later on (e.g. during spinOnce).