Added lib/indexes.

This is identical to the key compression/decompression scheme used in map.html
and _list/export. I will appear less stupid if both are moved to a single
library.
Changed _list/export to use lib/indexes.
Fixed wrong lexigraphic sort order in lib/indexes.
Changed map.html to use lib/indexes for index compression.