Use toInt() for casting `Message::Flags` and `Message::Type`, instead
of toUint().
MSVC has trouble with uint-based enums, so Quassel switched to int
enums. However, not all of the enum casts were converted, resulting
in needless unsigned-to-signed casting.