Sort rulesets when building sqlite DB.

Makes builds more deterministic.

See https://trac.torproject.org/projects/tor/ticket/11630#comment:20