Dropping deprecated database API function db_query()

Following recent commits [1] db_query() is no longer used in MantisBT.

Considering that the function is marked as deprecated since 1.2.0a2
(April 2008), it is time to effectively remove it.

Fixes #16898

[1] 3be86ce37bb469b211663da03f61ac2b28500d91, 7d76827617e97d7356e7eb4f2f66736e4c4d41b0, cf596c27b2a2e2aac67749b546cece9c23b4bbb1 and 0db530a855f92752aaa4bcf355df3ecba9af8226
Fix error with PostgreSQL when filtering on date custom field

As PostreSQL tries to add 0 to a string, it throws an error as it tries
to operate on different data types.

I can only guess that the +0 was a hack to convert type from string to
integer on MySQL.

Implementing solution proposed by user kensonman, using standard SQL
functions CAST, COALESCE and NULLIF to achieve a clean and portable
conversion to numeric (this assumes that the data stored in the
custom_fields_string table 'value' column is indeed numeric; if not we
would get other errors or warnings)

Note: this requires bumping MySQL minimum requirement to 5.08, since
DECIMAL type used in CAST was only added in that release.

Fixes #16584
Use variable to minimize array dereferencing
Install: bump minimum MySQL version

MySQL 5.08 is required due to use of CAST to DECIMAL type.

http://dev.mysql.com/doc/refman/5.0/en/cast-functions.html#function_cast.
Add constants for minimum DB versions supported
Install: use DB minimum versions constants
PostgreSQL: fix issue with date filters on custom fields

Pull request 125
Proper detection of path for admin checks
Admin checks: use standard html API calls
Admin checks: Simplify code to generate verbosity links
Define reference variables for database checks
Whitespace
Admin check: minimum RDBMS version
Admin check: reword ADOdb extension warning message
Admin check: MySQL database
Admin check: PostgreSQL database
Added checks for JpGraph library

Note: JpGraph seems to no longer be supported, maybe we should look for
a replacement in a future release.
Fix bug with verbosity links

Regression introduced by 527d9faf95884c7d260eeaaf27aa926c0ea5c194,
prevented user from swiching the 2 flags individually.
Reflow long lines
Proper processing of unhandled errors

Sometimes the execution of a test itself can trigger an error, and in
some cases the test can be successful despite of that (e.g. a PHP notice
or use of deprecated functionality). The code was not handling these
situations properly when $g_show_all = true, causing the test to
continue silently instead of reporting the problem.

Added a case for E_DEPRECATED and clarified description for unhandled
error types in check_print_error_rows(). Also made sure the error is
properly captured  when hiding passed tests and/or verbose error
messages are not shown.

Fixes #16890