New exportable functions: is_literal_value($) and is_plain_value($)

Ported from DBIC with some corner case fixes added.