Update indexer code, use core code if possible

The indexer page/meta key rename code will be merged in DokuWiki and
thus part of the spring 2013 release. If possible this code is used by
the plugin. If this is not possible a copy of exactly this code is used.