style: indentation and lines under 80 characters.

* inc/db.php, inc/formslib/sql.php: only aesthetic changes to keep lines under
80 characters, and to follow GNU coding guidelines.
inc/bb/calendar.php: remove oxbow code (leftovers from refactor ba73781)
Replace the deprecated mysql_* functions with PDO and PDO_MYSQL driver.

* inc/db.php: make connection to database using PDO and create an object meant
to be used as global variable. This is not the ideal solution but allows for
an initial move out of the mysql_ functions.
* inc/formslib/sql.php: all the calls to the mysql_ functions, were replaced
with methods to the global variable of the connection hence the require of
db.h where the connection is created.
(db_quiet): trimmed down to avoid code duplication with db_get().
(db_get_single, db_fetch_array): these used a comparison and check for resource
which no longer work when using objects. Replaced with is_a().