Fix "Object of class SQLite3Result could not be converted to int" within includes/database.class.php

Initial installations of statuspage on Ubuntu 12.04 with PHP 5.3.10 generate warnings such as:

    PHP Notice:  Object of class SQLite3Result could not be converted to int in /var/www/example.com/includes/database.class.php on line 16
    PHP Stack trace:
    PHP   1. {main}() /var/www/example.com/public/index.php:0
    PHP   2. include() /var/www/example.com/public/index.php:2
    PHP   3. Database->__construct() /var/www/example.com/includes/base.inc.php:8
    PHP   4. Database->initialize() /var/www/example.com/includes/database.class.php:9

    PHP Notice:  Object of class SQLite3Result could not be converted to int in /var/www/example.com/includes/database.class.php on line 28
    PHP Stack trace:
    PHP   1. {main}() /var/www/example.com/public/index.php:0
    PHP   2. include() /var/www/example.com/public/index.php:2
    PHP   3. Database->__construct() /var/www/example.com/includes/base.inc.php:8
    PHP   4. Database->initialize() /var/www/example.com/includes/database.class.php:9

    PHP Notice:  Object of class SQLite3Result could not be converted to int in /var/www/example.com/includes/database.class.php on line 44
    PHP Stack trace:
    PHP   1. {main}() /var/www/example.com/public/index.php:0
    PHP   2. include() /var/www/example.com/public/index.php:2
    PHP   3. Database->__construct() /var/www/example.com/includes/base.inc.php:8
    PHP   4. Database->initialize() /var/www/example.com/includes/database.class.php:9

database.class.php attempts to evaluate an SQLite3Result object numerically.

This patch addresses this issue, while utilising existing behaviour if the passed var isn't an object.