Indexer: add getPID/getPageFromPID functions and PID to INDEXER_PAGE_ADD

This allows plugins to get the PID for a page and also to get the page
for a certain PID. That way plugins can build their own index that uses
numeric ids.
Indexer: Add test case for the PID functions
Indexer: Add cache for getPID()

This avoids re-reading of the page index file for every getPID()-call by
using a simple FIFO cache, limited to 10 items. In idx_addPage() and the
functions that it calls getPID() is called 3 times for the same PID.
Indexer: Make $Indexer in idx_get_indexer() global instead of static

This avoids problems with test cases that use the indexer and the PID
cache - the index is cleaned between test cases but the PID cache
wasn't cleaned. Now PHPUnit can unset the global $Indexer between test
cases.
Add clear function to the indexer that deletes the whole index
Remove global $Indexer, clear index in the testing system instead
Remove superfluous requires and variables from bin/indexer.php
Merge pull request #148 from michitux/indexer

Indexer: Add the PID to INDEXER_PAGE_ADD and add getPID/getPageFromPID functions