add db proxy layer

currently implemented as using PEAR::DB and converting PEAR_Errors to DbException
db layer's job is to replace {{%table}} with proper table prefix
cosmetics
convert user class to new db api, use parameters where possible

db errors are logged by db layer, no need to do that in code
convert attachment class to new db api, use parameters where possible
convert attachment class db api, use parameters where possible
convert category class db api, use parameters where possible
convert crm class db api, use parameters where possible. fixes some invalidated input security
convert custom_field class db api, use parameters where possible. fixes some invalidated input security
DbPear: quote PEAR::DB specific placeholders: '&!', allow only '?'
Db: add getPair() - simplified getAssoc allowing only two columns
DbInterface: add DB_FETCHMODE constant to class
add test for db interfaces
use getPair where appropriate in already converted classes
DbPear: report exception location better, from callers file:line
DbPear: escape incompatible placeholders only when using params
getAuthorizedRepliers: use all params
display_column: use exceptions and paramters
group: use exceptions and parameters
search_profile: use exceptions and parameters
project: use exceptions and parameters