Update mysql_* -> mysqli_* in api.php
Update mysql_* -> mysqli_* in api.php

PHP mysql_* has been deprecated and removed from later versions of PHP. In order
to make local development easier, enable use of prepared queries, and
potentially unblock server upgrades, update mysql_* calls to mysqli_* calls. The
mysqli_* functions require a database handle to be stored globally or passed
around many calls; the former approach is taken in this commit.

cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,cmu-delphi/delphi-epidata,undefx/delphi-epidata,cmu-delphi/delphi-epidata,undefx/delphi-epidata,cmu-delphi/delphi-epidata