global problem counter to += problems
priv_problems now in err_functions.php; option to return problem report, rather than array of references, in sql_references()
reorder pi/mysql.php
do systematic problem handling in sql_delete_*()