Fix several issues commiting data to db

orm: Fix detection of statement failure
orm: Fix type detection of InstrumentedList::add
mysqli: Set object-level character set
Merge pull request #223 from greezybacon/issue/db-char-munging

Fix several issues committing data to db

Reviewed-By: Peter Rotich <peter@osticket.com>