Canonify promiser name before testing if class is set

Also clean up some code; the function now asserts that
excluded is valid, and there is only one caller.

Add uncanonifed promiser to existing test case.

Fixes Redmine #6561
On what basis do you claim this is a valid class name ?
I don't think it is, and I think changing to support this is a meaningful change in the policy language, requiring @estenberg's opinion as to whether this is a smart choice.
I would argue that we should raise an error on a class-name that's invalid and advise the user to rewrite the policy to use a canonified string instead (if there's even a sane use-case for arbitrary strings as class names).
If we do the canonifying, behind the scenes, users are going to complain when two class names that canonify to the same form are treated as the same (i.e. setting one causes the other to be set, too).  If I also have a file called `/etc/debian/version` that I want to use as a class name, yours is going to collide with it.
If the user is resposible for the canonify()ing, we can justly point out the error of their ways; if we silently do it behind the scenes, they'll say it's our bug when they get collisions.