Add support for PostgreSQL using the database abstraction layer. Removes
remaining MySQL specifics found here and there. MySQL and PostgreSQL
seem to be working nicely now, further testing is encouraged. MS SQL and
SQL Server seemed broken from the outset and no effort has been made to
fix them as I do not have access to either. Inconsistent line endings in
the code base and having a mix of spaces and tabs in some places makes
the diff a little less clean than one would wish.

Main changes:

 * added PostgreSQL database abstraction class

 * MySQL purging: abstract out the identifier quote style to remove hardcoded MySQL
   backticks, abstract out FROM_UNIXTIME, remove MySQL schema doc from
   XHProfRuns_Default, use explicit aliases in getRunComparativeData() to
   not rely on implicit MySQL aggregate column naming.

 * Fix method declarations and some variable issues in the database
   abstractions which leads me to believe that not all of the database
   classes actually work. Added notes about remaining portability issues
   for other databases than MySQL and PostgreSQL.

 * Remove unused dir property and constructor param from
   XHProfRuns_Default. This is a left-over from the Facebook file
   backend and there should be no compelling reason to retain it
   anymore.

Cosmetics/refactorings:

 * centralized (un)serializing, made things a bit DRYer

 * Use XHPROF_LIB_ROOT everywhere in index.php.

 * fix typos here and there.

 * declare xhprof global in the header and footer includes too to
   fix scope when including files.