Merge pull request #3366 from kgaillot/best-practices
Move a few rule-related functions to libcrmcommon