Cap the number of channels that an NLS can create for other packages

Also tweaked createConversationNotificationChannelForPackage to fix several edge conditions that could result in NPEs.

Bug: 425662627
Test: atest NotificationManagerServiceTest + manual
Flag: EXEMPT Bugfix
(cherry picked from commit 16b6836078042fc1b2288912e9656d01d9d20af5)
Cherrypick-From: https://googleplex-android-review.googlesource.com/q/commit:262f537110110e85eb0aaf27fbf6ee38a1659b05
Merged-In: I21033ce09185992adc0a377c701a442e8e81a9be
Change-Id: I21033ce09185992adc0a377c701a442e8e81a9be
4 files changed