Split code for service and plugin elements of script

In response to http://forum.xbmc.org/showthread.php?tid=176864&pid=1670478#pid1670478, this change lets the script work as a traditional plugin as well as a widget provider.