Implement equals() for CommandHandler to ensure that commands are not registered twice