Fix New Coverity Static Analysis Issues

This changeset fixes a variety of issues detected by running the Coverity static analysis tool on the XBMC codebase.