Add validations for rule sub-components

Implement validations to run before the creation of rule sub-components:
atomic formula, and open formula.

Bug: 141979167
Test: atest FrameworksServicesTests:AtomicFormulaTest
Test: atest FrameworksServicesTests:OpenFormulaTest
Change-Id: I53a1955129ea79f2c1f1647302df51556f858615
4 files changed