[DO NOT MERGE] Enable selective API query profiling via URL parameters.

Pass ?echo=true to turn on sqlalchemy debug output, or ?profile=true to profile
the API call execution with pyinstrument.