auto: translate regex to int aregex for automaton

regex_to_aregex returns the translated regex as well as a mapping from
interges to the original pchars (link-free policy, link pairs).