Agent#valid?: Rescue Liquid::Error and save it in errors.

Calling valid? should not raise any exception in general, and in our
case it is undesirable for a syntactically wrong Liquid template in
options to cause Internal Server Error in validation.