Implement service worker (fix #218)
It is quite simple for now: requests are divided in 2 categories:
- network first for all calls to the API as we want the results to be fresh and cache it then for offline use.
- cache first for everything else, then fetch and store the updated result.