hydiomatic.core: Implement (simplify)

This function takes a form, and applies simplifications until no more
rules apply.

Signed-off-by: Gergely Nagy <algernon@madhouse-project.org>