Introduce a AbstractRepository as interface to the rules database and
implement a YML storage that implements it.
Additionally, a FakeStorage implements that interface to test diversion
related code, without I/O calls and side effects. It keeps the rules
in-memory for the test duration.
Related #2675