Fix gc errors

General cleanups and some fixes.
- Avoid keeping xbmcaddon.Addon instance where it confuses GC
- Use new style classes
- Use exec function instead of keyword
- Replace has_key() with 'in' keyword
- Expand tabs and use indentation of 4 spaces
- Remove trailing spaces
- Reformat for better readability
- Reorder and remove unused imports