[test] add unit tests for ruleset
We extract the rules building logic from readfile into a Ruleset.buildrules()
method to ease testing.
# Log every push and pull to the servelog[hooks]changegroup.aaaaa_servelog = python:mercurialserver.servelog.hookoutgoing.aaaaa_servelog = python:mercurialserver.servelog.hook