normalize: support flags

TODO:
  * GRN_STRING_WITH_TYPES should be outputted and tested.
  * GRN_STRING_WITH_CHECKS should be outputted and tested.
  * "FLAG1|FLAG2|..." pattern should be tested.
  * "FLAG1 | FLAG2 | ..." pattern should be tested.