Fixes when using MySQL

- db_query of an insert returns 0 if the table doesn't have an AI PK!!
Merge remote-tracking branch 'origin/develop' into editor

Conflicts:
	library/Xerte/Authentication/Db.php
Fix after PDO merge