Make actions shown in message view menu configurable

Fixes #5850.