Move validation of children to OpenProject core

https://community.openproject.org/work_packages/17318

Depends on https://github.com/opf/openproject/pull/2315