tools/rules: enforce specs: groupid is integer; rule format.

"""
rule: if no timerec field is present: sip_domain_name+":"+groupid+":"+prefix
"""
tools/rules: conversely, `ruleid` is not specified. Use `rule` as the ID.