rules: new function to check dependencies

As the object nlike Source, Ruleset and Suricata need to be
created in order we need a dependencies checking function.
rules: use dependencies checking function

Warn user he needs to create a Source before a Ruleset.
suricata: use dependencies checking function

Warn user he needs to create a Source and or a Ruleset before
creating a Suricata.