mysqli extension

Begin transitioning away from the antiquated "original" mysql interface for PHP. This patch will sit between the original osTicket mysql interface and the future ORM.