Refactor: Extract to_re_flags()

In order to support modifiers like g for findall, eventually class Rex will have to store string flags instead of numeric flags from re module. This PR is a baby step to detach re FLAGS from class Rex.