refactor how pages are requested

Convert internal page requests from URLs like item.php?p=dijit/Dialog&v=1.9 to something that looks like a static page URL: apidata/1.9/dijit/Dialog.

Use .htaccess rather than index.php to handle routing such a request to either lib.old/item.php or lib/item.php.  If we pre-generated the tab content then it could instead map the request to something like static/1.9/dijit/Dialog.html.

Also change url for json tree data to be like /tree/1.9.