Add main-db.php

Also rename a few QlDb method calls in other files.
Add log.xsl

XML style sheet referenced by Quearl-generated logs.