Refactor code to allow library view and to save data in memory

As we're still waiting for the new skin.widgets, I've taken the time to refactor the code to better allow skinners requests to be able to also use the script in the library view.

The previous problem was that with the reload parameter, XBMC wouldn't remember the users selected view. Without the reload parameter, stale data was loaded and never updated.

With this change, the reload parameter is now required to use cached data (e.g. for home page widgets). When omitted, cached data is never used (e.g. for library view).

I've also taken the opportunity to save the json queries in window properties rather than to disk - whilst this will increase the time needed to display results when first starting XBMC, it will also greatly reduce IO.