Fixes for mysqli. Add $connection param, add connection instance stored in db class.

Signed-off-by: Norv <a.w.norv@gmail.com>
Remove $db_connection global. The default connection is $db->connection().

Signed-off-by: Norv <a.w.norv@gmail.com>