generate: Add deep check for properties and signals
Classes may only inherit properties and signals from ancestors and interfaces, without having properties or signals of their own. In order to detect that from the template, we add two methods that traverse the hierarchy and implemented interfaces, and return whether there are properties or signals available.