fix #3797: Split not only on where, also on group by, having and order by.

Hi,

I tried to fix this bug: https://sourceforge.net/p/phpmyadmin/bugs/3797/

The fix isn't very difficult: the query were split on "where". But if there is no "where"? We should split on "group by"? And if there is no... etc, with "having" and "order by".

I'm not sure from which branch I should create my fix-branch... So I checked out QA_3_5 and created my fix-branch from this branch. Is this good please?
If it's not, please let me know, so I could train and create the good fix.
(Oh... I've just seen that I hadn't the "Able to merge", so I edited the pull request to link it to QA_3_5. I hope it's ok.)

Thanks.