Initial import

Quite buggy at this point.  The code is not very clear either.  But it
seems to work more or less when I try locally.  I still need to figure
out how exactly the cache manifest works.  Also I need to make it look a
bit better.