buffer: normalize_mode => whitespace enum class

This makes the usage of normalize_mode explicit and allows the
names to be simpler, taking advantage of the scoping rules for
enum class types.