Update database.php

+ Added more comments
+ escaped more values
+ encapsulated more keys
+ encapsulated column names
+ Automatically tries to use MySqli, then falls back to Mysql
+ Automatically tries to use SQlite3, then falls back to Sqlite.