In my case it was "ClamXav Sentry" a virus scanner that monitors folders like Downloads for viruses. If I quit that before I shutdown, my MacBook Pro Retina shuts down in couple seconds. If that is running when I shutdown, my MacBook Pro Retina takes about 32 seconds to shutdown.
If you have "ClamXav Sentry" installed, try Quitting that before you shutdown to see if you are having the same problem that I had.
BTW: Before I discovered that, I tried rebuilding the system caches with kext... and I also tried the "sudo defaults write /System/Library/LaunchDaemons/[...] ExitTimeOut -int 1" commands mentioned in other posts related to this shutdown problem, to no avail.
I hope this helps someone.