Full-fledged query buffers

Store query buffers per query the same way it's done for channels.

This allows clients to implement persistent query buffers. Queries
remain open across clients and sessions until a client explicitly
sends a command to clear a (closed) query buffer.

A new config option AutoClearQueryBuffer that default to false
ensures behavioral backwards compatibility, and another config
MaxQueries protects from OOM eg. due to PM attacks.
controlpanel: add support for AutoClearQueryBuffer & MaxQueries
webadmin: add support for AutoClearQueryBuffer & MaxQueries
clearbufferonmsg: handle query buffers
savebuff: handle query buffers
Merge pull request #598 from jpnurmi/query

Full-fledged query buffers
Enable C++11.

It bumps requirements for SWIG to 3.0.0, and for compiler.