implement parsing of CAST(), automatically parse dates inside literals

fix https://github.com/phpcr/phpcr-utils/issues/98