Issue #2659820 by msti, DamienMcKenna, dgtlmoon, lotyrin: Refactored hook_schema to be more normal, fixed MySQL 5.7 compatibility problems.