Sqlite::truncate(): Verify `sqlite_sequence` exists before _execute()

`sqlite_sequence` is a dynamic table that's only available when a table in
the database use an auto increment field.  For some cases, eg: databases that
exclusively use uuid for primary keys, this table won't exist and
truncate() call will fail with:

  Error: SQLSTATE[HY000]: General error: 1 no such table: sqlite_sequence
Reduce variable use/duplicate code.
Added/removed newlines to make the code more readable.
Add test for insertMulti with id in the last spot.

Both tests work, so there are no changes to the implementation.

Closes #4048
Fix CS.
Update afterSave() callback signature to be PHP5.4+ compliant.
Fix clearing groups with FileCache and no prefix.

If you used FileCache + groups + an empty prefix cached files would not
be cleared as strpos() would fail.
Merge pull request #1622 from bar/php54-afterSave

Update Model/Behavior afterSave() callback signature to be PHP5.4+ compliant.
Update afterFind() callback signature to be PHP5.4+ compliant.
Fixed setting of order in Paginator options when using model's order. Refs f680c76, #3902
Merge pull request #1623 from bar/php54-afterFind

Update afterFind() callback signature to be PHP5.4+ compliant.
add missing params for parent call
Merge pull request #1625 from dereuromark/master

add missing params for parent call
Merge pull request #1624 from ADmad/fix-paginator-order

Fix setting of order in Paginator options when using model's order. 

Refs #3902
Make the "pr" function use `printf` instead of `echo sprintf`
Merge pull request #1626 from ataylor32/pr-printf

Make the "pr" function use `printf` instead of `echo sprintf`
Replaced two elseifs by if in sqlserver datasource
Merge pull request #1628 from ravage84/sqlserver-elseif

Replaced two elseifs by if in sqlserver datasource
flushMethodCache not working if called before cacheMethod

When calling flushMethodCache it correctly empties self::$methodCache but if cacheMethod is called afterwards self::$methodCache gets populated with data from the Cache.
fix renderLayout and update deprecated and outdated code