This patch makes the cmdtype an attribute of the func returned by
registrar.command, so that we can make decisions in dispatch.py depending upon
the type of the command. If the cmdtype is not in the possible ones, we throw a
ProgrammingError.
Currently this will be used in deciding the level of access on hidden commits a
command can have.
Shouldn't this reference the constant from the enum class?