Process rule multiple times if there are multiple matches

We used to scan with a rule and take only the first matching token we found for
each symbol. Now we take all branching tokens.

There's some refactoring here too, where rule matching logic has been moved
into the Rule class.

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Move hash higher to end initialization section earlier

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>
Rename populate_rules to populateRules

Signed-off-by: Casey Dahlin <casey.dahlin@gmail.com>