This is a very large commit with major refactoring.
close #63, close #61, close #41, close #34, close #25, close #22
The cache system has been completly rewritten to allow for queuing and better structure.
The previous triggers have been extended to it's own module with system triggers which updates cache, fixes timestamps etc, there are more triggers to write though.
A logger module have been created which gives nicer output from the backend with timestamps and a reference to which module that printed the log.
There are a lot of other changes and still some cleanups to do, like naming of the client <-> server interface.
In the browser there is a problem sometimes when rotating or regenerating the cache where the browser does not update the image or get stuck at the spinner.