Logging profiler logs in start/end query functions.

This fixes missing log output for QUERY_MODE_EXECUTE (#41) and additionally
means that the the "prepare" query is logged in the the same way as users
normally see on the zend debug toolbar.
Don't reset profiles before calling endQuery.
MaxProfiles caps list size rather than clearing.
Merge pull request #42 from bnkr/log-immediate-and-prepare-queries

Logging profiler logs in start/end query functions.