Initialize the max channel counter to zero.

Previously, the max channel number was uninitialized, so messages were
dropped randomly because their channel id was lower than the garbage in
the max channel counter.