Different rule types implementation

Added rule_type property on the Rule class and changed a bit the
DynamicScripting class and the DynamicScriptingInstance class so that
each rule type will be chosen an equally amount of times
Rule category implementation

Merge was unsuccessful due to conflicts, so i resolved them and commit
them as changes to the master. The code was successfully executed before
committing.
!!! Check lines 128-130 there is a non defined  variable which is
probably not used anymore(I think it was removed from the master but was
still in the Category branch, but I am not sure).