Added multi-format image support in pic_bg.php.

Also moved mod_database to modules subfolder. Added realization for DB_SEPARATE_TABLES option.