Allow smex to work with command-frequency

Right now when I use smex with command-frequency it ends up keeping track of how many times I call smex instead of the commands that I execute.  Command-frequency uses real-last-command, and works with `execute-extended-command'.  The comment in `execute-extended-command' mentions that `real-this-command' should be set so that `repeat' will work.