Test: stress events flags to/from string conversion.
Fix keyspace events flags-to-string conversion.

Fixes issue #1491 on Github.