Generate escape sequences for special characters in the query

Fixes https://github.com/sosedoff/pgweb/issues/38