Escape closing quote character in table and column names
Fix -values not being handled properly with NULLs
New exportable functions: is_literal_value($) and is_plain_value($)

Ported from DBIC with some corner case fixes added.