Adding badge criteria for badge rules

A badge awarding can now be set as a criteria for a badge rule.