Refactor some utsarga-apavada code

Eventually I want to remove all utsarga-apavada stuff from rules.py.
This is a first step in the right direction.
Move more rule code into 'RuleTree'

Mainly selection and inference stuff. Now Ashtadhyayi.py interacts
only with a rule tree.
Add code to shrink long filter names
Add extra tests and comments for ashtadhyayi.py