support `%matplotlib qt5` and `%matplotlib nbagg`

just needed the key, since `%gui qt5` already works

also copy `%gui qt5` logic from #6496 to the kernel eventloop registry.

closes #6057