Don't use stored procedures for MySQL, and allow skipping of triggers.

It turns out that procedures are far too much of a hassle for anything other than a dedicated mysql installation, so the integrity-checking logic for FOF_VIEW_STATE_TABLE has been inlined into its triggers.  This should ease installation woes.

Also provided a new define SQL_NO_TRIGGERS to disable triggers entirely, as it seems that some shared hosting providers don't even allow for those.

Small fix so SQLite reference migrations don't throw execeptions, even though they won't do anything yet.