Added caching support to wiki.index()

Rather than recalculating the index every time we load a
directory listing or ask for tags, cache it for a while.
Also invalidates the cache for a directory when a change
is saved there.