Allow osTicket to install on a database cluster

The problem stems from assumed MySQL insert ids. In MySQL clusters, the id
numbers will not necessarily be consecutive. This patch causes the install
and upgrade patches to lookup the assumed values for the linked id numbers.