Something has gone terribly wrong, but I can't figure what. YUM should not 'clean up' indefinitely (an hour is too long), and forcibly terminating it (as by re-booting, or even re-start X11) might wreck the RPM database, which YUM also relies upon.
A complete re-install at this point, if you can bear to wipe the existing OS, is probably the best idea. If the next install does not exhibit such delays, be extra careful when 'installing' software from tarballs/source code/binaries: they can wreak havoc on your clean OS.
Please let us know how it turns out.