Increase LearnDB term length limit, apply the same limit to queries as when inserting. (Patashu).

Also allow quoting terms for add/edit.