Improve functional tests and coverage and fix bugs

Added functional test coverage of creating, editing, deleting rules in the ACP.

Uncovered a critical bug preventing board rules from being created in postgresql dbs, which has also been solved in this PR.